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