presto-parquet/src/main/java/io/prestosql/parquet/dictionary/BinaryDictionary.java/BinaryDictionary/BinaryDictionary
class BinaryDictionary:    public BinaryDictionary(DictionaryPage dictionaryPage, Integer length)
            throws IOException
    {
        super(dictionaryPage.getEncoding());
        byte[] dictionaryBytes = dictionaryPage.getSlice().getBytes();
        content = new Binary[dictionaryPage.getDictionarySize()];
        int offset = 0;
        if (length == null) {
            for (int i = 0; i < content.length; i++) {
                int len = readIntLittleEndian(dictionaryBytes, offset);
                offset += 4;
                content[i] = Binary.fromReusedByteArray(dictionaryBytes, offset, len);
                offset += len;
            }
        }
        else {
            checkArgument(length > 0, "Invalid byte array length: %s", length);
            for (int i = 0; i < content.length; i++) {
                content[i] = Binary.fromReusedByteArray(dictionaryBytes, offset, length);
                offset += length;
            }
        }
    }