package decompress
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=51983d4497ccb27c253e7464b03d38544aad51e0e7d537e405f4df6954c27ab0
sha512=17c7e3dc79b7cedaf649c208874a50a810002c71d061c133239b9813a9dfe424ba303a968ba68c728862bb20ceaa23465097334bc16b819317390d01c2f91f89
doc/decompress.de/De/Queue/index.html
Module De.Queue
The type for queues.
A command is a small representation of a `Literal or a `Copy command. A `Copy command is usually emitted by a compression algorithm to inform to copy length byte(s) appeared offset byte(s) before.
DEFLATE has some limitations about `Copy command.
Raised when push_exn is applied to a full queue.
val is_empty : t -> boolReturn true if the given queue is empty, false otherwise.
val is_full : t -> boolReturn true if the given queue is full, false otherwise.
val length : t -> intReturn the number of elements in the given queue.
val available : t -> intFree cells available on the given queue.
push_exn q x adds the element x at the end of the queue q. It raises Full if the given queue q is full.
pop_exn q removes and returns the first element in the given queue q. It raises Empty if the given queue q is empty.
val junk_exn : t -> int -> unitjunk_exn q n discards n elements in the given queue q. If q does not have enough elements, it raises Empty and the given queue is unchanged.
val cmd : [ `Literal of char | `Copy of int * int | `End ] -> cmdcmd command is cmd from a human-readable value.
val create : int -> tcreate len allocates a new queue, initially empty. len must be a power of two, otherwise it raises Invalid_argument.
val reset : t -> unitDiscard all elements from a queue.
val to_list : t -> [ `Literal of char | `Copy of int * int | `End ] listval of_list : [ `Literal of char | `Copy of int * int | `End ] list -> t