presto-orc/src/main/java/io/prestosql/orc/DictionaryCompressionOptimizer.java/DictionaryCompressionOptimizer/convertLowCompressionStreams
class DictionaryCompressionOptimizer:    private int convertLowCompressionStreams(int bufferedBytes)
    {
        // convert all low compression column to direct
        for (DictionaryColumnManager dictionaryWriter : ImmutableList.copyOf(directConversionCandidates)) {
            if (dictionaryWriter.getCompressionRatio() < DICTIONARY_MIN_COMPRESSION_RATIO) {
                int columnBufferedBytes = toIntExact(dictionaryWriter.getBufferedBytes());
                OptionalInt directBytes = tryConvertToDirect(dictionaryWriter, getMaxDirectBytes(bufferedBytes));
                if (directBytes.isPresent()) {
                    bufferedBytes = bufferedBytes + directBytes.getAsInt() - columnBufferedBytes;
                    if (bufferedBytes >= stripeMaxBytes) {
                        return bufferedBytes;
                    }
                }
            }
        }
        return bufferedBytes;
    }