package bytesrw
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=e3f07dbd808e152cd4b2ea5c2fa3863d4b72f7f97cfa3cd7493a3725c84f39d882042388ee47c9d6acfd30a650c21db429c8264db3d7466cad6e580308b5a2d2
doc/bytesrw.zlib/Bytesrw_zlib/Zlib/index.html
Module Bytesrw_zlib.ZlibSource
zlib streams.
Decompress
decompress_reads () r filters the reads of r by decompressing a zlib stream. If leftover is:
false(default), the reader errors if there is leftover data after the end of thezlibstream.truethe reader decompresses onezlibstream. Once the reader returnsBytesrw.Bytes.Slice.eod,ris positioned exactly after the end of thezlibstream and can be read again to perform other non-filtered reads.
decompress_writes () w ~eod filters writes on w by decompressing a zlib stream until Bytesrw.Bytes.Slice.eod is written, if leftover data remains an error is raised. If eod is false the last Bytes.Slice.eod is not written on w and at this point w can be used again to perform othe non-filtered writes.
Compress
compress_reads ~level () r filters the reads of r by compressing them to a zlib stream at level level (defaults to default_compression).
compress_writes ~level () w ~eod filters writes on w by compressing them to a zlib stream at level level (defaults to default_compression) until Bytesrw.Bytes.Slice.eod is written. If eod is false, the latter is not written on w and at that point w can be used again to perform non-filtered writes.