Streaming interface to the Zlib library.
module Biocaml_zip:
sig
module Default:
sig
val zlib_buffer_size : int
val level : int
Transform.zip
. It's
value is 3, bigger values (up to 9) decrease performance while
slightly improving the compression.end
module Error:
sig
typeunzip =
[ `garbage_at_end_of_compressed_data of string
| `wrong_gzip_header of
[ `compression_method | `flags | `magic_number ] * int
| `zlib of string ]
typet =
unzip
val unzip_of_sexp : Sexplib.Sexp.t -> unzip
val sexp_of_unzip : unzip -> Sexplib.Sexp.t
end
In_chanel.t
Functionsval unzip_in_channel : ?format:[ `gzip | `raw ] ->
?zlib_buffer_size:int ->
?buffer_size:int ->
Pervasives.in_channel ->
(string, [> Error.t ]) Core.Std.Result.t Stream.t
val zip_in_channel : ?format:[ `gzip | `raw ] ->
?zlib_buffer_size:int ->
?level:int -> ?buffer_size:int -> Pervasives.in_channel -> string Stream.t
exception Error of Error.unzip
*_exn
functions of this module.val unzip_in_channel_exn : ?format:[ `gzip | `raw ] ->
?zlib_buffer_size:int ->
?buffer_size:int -> Pervasives.in_channel -> string Stream.t
unzip_in_channel
but calls to Stream.next
may raise
Error e
exceptions.Transform.t
Implementationsmodule Transform:
sig
val unzip : ?format:[ `gzip | `raw ] ->
?zlib_buffer_size:int ->
unit ->
(string, (string, [> Biocaml_zip.Error.unzip ]) Core.Std.Result.t)
Biocaml_transform.t
format
is `raw
(i.e. only apply the "deflate"
algorithm to the stream); `gzip
means that the transform must first
skip a gzip header.val zip : ?format:[ `gzip | `raw ] ->
?level:int ->
?zlib_buffer_size:int -> unit -> (string, string) Biocaml_transform.t
end
end