presto-orc/src/main/java/io/prestosql/orc/metadata/CompressedMetadataWriter.java/CompressedMetadataWriter/writeMetadata
class CompressedMetadataWriter:    public Slice writeMetadata(Metadata metadata)
            throws IOException
    {
        metadataWriter.writeMetadata(buffer, metadata);
        return getSliceOutput();
    }