Might be raised when decompressing a message using a single pass decompression function.
Decompressed size is an optional field of compressed messages, but is always present when using a single-pass function such as
With_bulk_dictionary.compress. If the decompressed size is not present in the message, it might be necesary to use streaming mode to decompress the message.
Might be raised when decompressing a message using a single pass decompression function, indicating an error when inspecting the message -- for instance, invalid magic numbers.
Compression / decompression functions below might raise this exception if the return value they are passed does not have enough capacity. The argument is the required capacity.
exception Decompressed_size_exceeds_max_int of Core.Int64.t
The size of compressed messages is encoded in as a 64 bit integers. This OCaml library internally uses
Int.t to represent size and can't decode messages whose sizes would not fit on an int. For those messages, decompression using the streaming mode is recommended.
compression_output_size_bound x is the maximum possible output size when doing a a single-pass compression of an input of size
(Single pass means something like
Simple.compress; maximum possible means the worst case of the compression algorithm.).
module Output : sig ... end
module Input : sig ... end
Returns the decompressed size of a message. Since decompressed size is an optional field of compressed message, it might raise
module Compression_context : sig ... end
module Decompression_context : sig ... end
module Simple : sig ... end
module With_explicit_context : sig ... end
This module implements compression and decompression with explicitly managed contexts. When compressing or decompressing many times, it is recommended to allocate a context just once, and re-use it for each successive compression operation. This will make workload friendlier for system's memory.
module Dictionary : sig ... end
module Simple_dictionary : sig ... end
module Bulk_processing_dictionary : sig ... end
module Streaming : sig ... end
The functions exposed in this module differ from the rest of the library, and operates on stream of data (rather than on single messages). Therefore, the API is more complex, and does not use the