Module Ben.Compression

type t
val of_string : string -> t
val default : t
val is_known : string -> bool
val file_is_compressed : string -> bool
val extension : t -> string
val display_tool : t -> string
val with_decompressed_file : string -> (Stdlib.in_channel -> 'a) -> 'a

with_decompressed_file filename f calls f on the decompressed contents of filename. The compression format comes from the file extension.

val decompress_to : t -> string -> Unix.file_descr -> unit

decompress_to format filename fd decompresses filename as format and writes the result to fd, with the decompression tool writing directly to fd. Raises Decompression_failed if the tool fails.