presto-rcfile/src/main/java/io/prestosql/rcfile/text/ListEncoding.java/ListEncoding/encodeValueInto
class ListEncoding:    @Override
    public void encodeValueInto(int depth, Block block, int position, SliceOutput output)
            throws RcFileCorruptionException
    {
        byte separator = getSeparator(depth);

        Block list = block.getObject(position, Block.class);
        for (int elementIndex = 0; elementIndex < list.getPositionCount(); elementIndex++) {
            if (elementIndex > 0) {
                output.writeByte(separator);
            }
            if (list.isNull(elementIndex)) {
                output.writeBytes(nullSequence);
            }
            else {
                elementEncoding.encodeValueInto(depth + 1, list, elementIndex, output);
            }
        }
    }