package rfc1951
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Rfc1951.L
Source
Lz77 algorithm.
A functionnal non-blocking implementation of Lz77 algorithm. This algorithm produces a Hunk.t list
of an input.
This algorithm is the same as https://github.com/Blosc/c-blosc. So the implementation is an imperative hack in OCaml. May be it's not the best in the functionnal world but it works. The interface was thinked to be replaced by your implemenation by a functor.
The functor was not done now but may be soonly. So, TODO!
Lz77 error.
The state of the Lz77 algorithm.
Pretty-printer of Lz77 error.
Pretty-printer of Lz77 state.
used_in t
returns n
bytes(s) used by the algorithm in the current input.
default ~level ~on wbits
produces a new state to compute the Lz77 algorithm in an input. level
means the level of the compression (between 0 and 9), on
is a function called when the algorithm produce one Hunk.t
and wbits
is the window size allowed.
Usually, wbits = 15
for a window of 32K. If wbits
is lower, you constraint the distance of a Match
produced by the Lz77 algorithm to the window size.
on
is a function to interact fastly with your data-structure and keep the frequencies of the Literal
and Match
.