package bytesrw
Install
Dune Dependency
Authors
Maintainers
Sources
sha512=fd1ee852cf9d8c3b1800d4927c18453b18385b49354fb3ea71ae08f1ca640741c0594863c5db339432da55a9ee42e4fdbc8d6ef0afe29a375aac1ec6cee11c0b
doc/bytesrw.zlib/Bytesrw_zlib/index.html
Module Bytesrw_zlib
deflate
, zlib
and gzip
streams.
This module provides support for reading and writing deflate
, zlib
and gzip
streams with the zlib
C library.
Slice lengths. The slice length of readers created by filters of this module defaults to default_slice_length
. The hinted slice length of writers created by filters of this module defaults to default_slice_length
and they write on their writers with slices that respect their desires.
Positions. The position of readers and writers created by filters of this module default to 0
.
Errors
The type for deflate
, zlib
and gzip
stream errors.
Except for the library parameters, all functions of this module and resulting reader and writers may raise Bytesrw.Bytes.Stream.Error
with this error.
The type for compression levels.
An integer between -1
and 9
, see these constants.
Streams
Library parameters
default_slice_length
is 128KB
. Note, this choice is made by Bytesrw_zlib
not the zlib
library.
Compression levels
val default_compression : level
default_compression
is -1
, the default compression level. The resulting level depends on the zlib
library.
val no_compression : level
no_compression
is 0
, indicates no compression.
val best_speed : level
best_speed
is 1
, indicates fastest compression.
val best_compression : level
best_compression
is 9
, indicates best compression.