presto-orc/src/main/java/io/prestosql/orc/OrcOutputBuffer.java/OrcOutputBuffer/getOutputDataSize
class OrcOutputBuffer:    public long getOutputDataSize()
    {
        checkState(bufferPosition == 0, "Buffer must be flushed before getOutputDataSize can be called");
        return compressedOutputStream.size();
    }