package bytesrw

  1. Overview
  2. Docs
Composable byte stream readers and writers for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

bytesrw-0.2.0.tbz
sha512=e3f07dbd808e152cd4b2ea5c2fa3863d4b72f7f97cfa3cd7493a3725c84f39d882042388ee47c9d6acfd30a650c21db429c8264db3d7466cad6e580308b5a2d2

doc/bytesrw.zlib/Bytesrw_zlib/index.html

Module Bytesrw_zlibSource

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

Sourcetype Bytesrw.Bytes.Stream.error +=
  1. | Error of string

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.

Sourcetype level = int

The type for compression levels.

An integer between -1 and 9, see these constants.

Streams

Sourcemodule Deflate : sig ... end

deflate streams.

Sourcemodule Zlib : sig ... end

zlib streams.

Sourcemodule Gzip : sig ... end

gzip streams.

Library parameters

Sourceval version : unit -> string

version () is the version of the zlib C library.

Sourceval default_slice_length : int

default_slice_length is 128KB. Note, this choice is made by Bytesrw_zlib not the zlib library.

Compression levels

Sourceval default_compression : level

default_compression is -1, the default compression level. The resulting level depends on the zlib library.

Sourceval no_compression : level

no_compression is 0, indicates no compression.

Sourceval best_speed : level

best_speed is 1, indicates fastest compression.

Sourceval best_compression : level

best_compression is 9, indicates best compression.