compress_z.ml 1.7 KB
Newer Older
MARCHE Claude's avatar
MARCHE Claude committed
1 2 3
(********************************************************************)
(*                                                                  *)
(*  The Why3 Verification Platform   /   The Why3 Development Team  *)
4
(*  Copyright 2010-2015   --   INRIA - CNRS - Paris-Sud University  *)
MARCHE Claude's avatar
MARCHE Claude committed
5 6 7 8
(*                                                                  *)
(*  This software is distributed under the terms of the GNU Lesser  *)
(*  General Public License version 2.1, with the special exception  *)
(*  on linking described in file LICENSE.                           *)
9
(*                                                                  *)
MARCHE Claude's avatar
MARCHE Claude committed
10
(********************************************************************)
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71

let compression_supported = true

module type S = sig 

type out_channel

val open_out: string -> out_channel

val output_char: out_channel -> char -> unit

val output: out_channel -> string -> int -> int -> unit

val output_string: out_channel -> string -> unit

val close_out: out_channel -> unit

type in_channel

val open_in: string -> in_channel

val input: in_channel -> string -> int -> int -> int

val really_input: in_channel -> string -> int -> int -> unit

val input_char: in_channel -> char

val close_in: in_channel -> unit

end


module Compress_none = Pervasives

module Compress_z = struct

type out_channel = Gzip.out_channel

let open_out fn = Gzip.open_out ~level:6 fn

let output_char = Gzip.output_char

let output = Gzip.output

let output_string ch s = output ch s 0 (String.length s)

let close_out = Gzip.close_out

type in_channel = Gzip.in_channel

let open_in = Gzip.open_in

let input = Gzip.input

let really_input = Gzip.really_input

let input_char = Gzip.input_char

let close_in = Gzip.close_in

end