presto-orc/src/main/java/io/prestosql/orc/OrcOutputBuffer.java/OrcOutputBuffer/writeDataTo
class OrcOutputBuffer:    public int writeDataTo(SliceOutput outputStream)
    {
        checkState(bufferPosition == 0, "Buffer must be closed before writeDataTo can be called");
        for (Slice slice : compressedOutputStream.getSlices()) {
            outputStream.writeBytes(slice);
        }
        return compressedOutputStream.size();
    }