package decompress

  1. Overview
  2. Docs
Implementation of Zlib and GZip in OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

decompress-1.5.2.tbz
sha256=a8c9a6ba132514d56ad3626fbd5e79124844836010350ee161d43bb29bf5762e
sha512=1a5a935ff55ebad83682cffb9792b1b5e3a189d2df483f77856ea683706219f7c50ff14b7ab1de0c5ce90e0d779bd06ab86afb29d39461192fbbf4b3fbaf600c

doc/decompress.de/De/Inf/Ns/index.html

Module Inf.NsSource

A non-streamable implementation of the RFC 1951. It considers the input to be whole and is therefore able to save some time

Sourcetype error = [
  1. | `Unexpected_end_of_input
  2. | `Unexpected_end_of_output
  3. | `Invalid_kind_of_block
  4. | `Invalid_dictionary
  5. | `Invalid_complement_of_length
  6. | `Invalid_distance
  7. | `Invalid_distance_code
]

The type for inflation errors.

Sourceval pp_error : Format.formatter -> error -> unit

Pretty-printer of error.

Sourceval inflate : bigstring -> bigstring -> (int * int, [> error ]) result

inflate src dst w inflates the content of src into dst.

In case of sucess, it returns the bytes read and the bytes writen in an Ok result. In case of failure, it returns the error in an Error result. We assume that src is well formed and dst is enough larger to store the result of the inflation. The usual worst case is when dst must be equal (in size) or larger than src. Such case appears for really small objects and in that case, we returns Error `Unexpected_end_of_output.

OCaml

Innovation. Community. Security.