Signed-off-by: David Scott <dave.scott@eu.citrix.com>
)
) (fun () -> List.iter close !to_close)
-let compress = go Compress Active
-let decompress = go Decompress Active
+let compress fd f = go Compress Active fd f
+let decompress fd f = go Decompress Active fd f
-let decompress_passive = go Decompress Passive
+let decompress_passive fd f = go Decompress Passive fd f
(** Runs a decompression process which is fed from a pipe whose entrance is passed to 'f'
and whose output is 'ofd' *)
-val decompress: Unix.file_descr -> (Unix.file_descr -> unit) -> unit
+val decompress: Unix.file_descr -> (Unix.file_descr -> 'a) -> 'a
(* Experimental decompressor which is fed from an fd and writes to a pipe *)
-val decompress_passive: Unix.file_descr -> (Unix.file_descr -> unit) -> unit
+val decompress_passive: Unix.file_descr -> (Unix.file_descr -> 'a) -> 'a