presto-rcfile/src/main/java/io/prestosql/rcfile/binary/StructEncoding.java/StructEncoding/decodeValueInto
class StructEncoding:    @Override
    public void decodeValueInto(BlockBuilder builder, Slice slice, int offset, int length)
    {
        int fieldId = 0;
        int nullByte = 0;
        int elementOffset = offset;
        BlockBuilder rowBuilder = builder.beginBlockEntry();
        while (fieldId < structFields.size() && elementOffset < offset + length) {
            BinaryColumnEncoding field = structFields.get(fieldId);

            // null byte prefixes every 8 fields
            if ((fieldId % 8) == 0) {
                nullByte = slice.getByte(elementOffset);
                elementOffset++;
            }

            // read field
            if ((nullByte & (1 << (fieldId % 8))) != 0) {
                int valueOffset = field.getValueOffset(slice, elementOffset);
                int valueLength = field.getValueLength(slice, elementOffset);

                field.decodeValueInto(rowBuilder, slice, elementOffset + valueOffset, valueLength);

                elementOffset = elementOffset + valueOffset + valueLength;
            }
            else {
                rowBuilder.appendNull();
            }
            fieldId++;
        }

        // Some times a struct does not have all fields written
        // so we fill with nulls
        while (fieldId < structFields.size()) {
            rowBuilder.appendNull();
            fieldId++;
        }

        builder.closeEntry();
    }