module GZip: Libs.GZipGZip - compression/decompression interface.
This module provide access to GZip compression and decompression
functionalities. Both the common (de)compression interface
(implemented by all compression libraries available via Batteries)
and GZip-specific functionalities are accessible using this
module.
Author(s): Stefano Zacchiroli
val uncompress : IO.input -> IO.input
Operations performed on the returned channel can raise, in
addition to their usual exceptions,
Codec.Compression_error.
val open_in : ?mode:File.open_in_flag list ->
?perm:File.permission -> string -> IO.inputFile.open_inval with_in : IO.input -> (IO.input -> 'a) -> 'awith_in input f creates a new input input' which will
transparently decompress data from input, then invokes f
input' to process that new input. Once f has returned or
triggered an exception, the input' is closed before
proceeding.val compress : 'a IO.output -> unit IO.output
Operations performed on the returned channel can raise, in
addition to their usual exceptions,
Codec.Compression_error.
If you use this function, you will need to close the
channel manually, using IO.close_in.
val open_out : ?mode:File.open_out_flag list ->
?perm:File.permission -> string -> unit IO.outputFile.open_outval with_out : unit IO.output -> (unit IO.output -> 'a) -> 'awith_out output f first creates a new output output' which will
transparently compress data to output and then invokes f output'.
Once f output' has returned or triggered an exception,
output' is closed before proceeding.
Provide acces to GZip-specific features.
val gzip_compress : ?level:int -> 'a IO.output -> unit IO.outputGZip.compress, but
enable to specifiy gzip-specific compression parametersInvalid_argument if level is not included in the expected
rangelevel : compression level (an integer between 1 and 9),
with 1 being the weakest (but fastest) compression and 9 being
the strongest (but slowest) compression. Default: 6.