sig
  external zlib_get_version_string : unit -> string
    = "mlzlib_get_version_string"
  type z_flush = [ `BLOCK | `FINISH | `FULL_FLUSH | `NO_FLUSH | `SYNC_FLUSH ]
  val z_no_compression : int
  val z_best_speed : int
  val z_best_compression : int
  val z_default_compression : int
  type z_strategy =
      [ `DEFAULT_STRATEGY | `FILTERED | `FIXED | `HUFFMAN_ONLY | `RLE ]
  type z_fields = {
    mutable next_in : string;
    mutable next_in_offset : int;
    mutable avail_in : int;
    mutable next_out : bytes;
    mutable next_out_offset : int;
    mutable avail_out : int;
  }
  type z_header = [ `default | `gzip | `raw ]
  type z_stream_deflate
  external deflate_init :
    level:int ->
    strategy:Zlib.z_strategy ->
    header:Zlib.z_header -> unit -> Zlib.z_stream_deflate
    = "mlzlib_deflate_init"
  val deflate :
    Zlib.z_stream_deflate ->
    Zlib.z_fields ->
    [ `BLOCK
    | `FINISH
    | `FULL_FLUSH
    | `NO_FLUSH
    | `PARTIAL_FLUSH
    | `SYNC_FLUSH ] -> [> `ended | `ok ]
  external deflate_close : Zlib.z_stream_deflate -> unit
    = "mlzlib_deflate_close"
  type z_stream_inflate
  external inflate_init :
    header:[ `auto | `default | `gzip | `raw ] ->
    unit -> Zlib.z_stream_inflate = "mlzlib_inflate_init"
  val inflate :
    Zlib.z_stream_inflate ->
    Zlib.z_fields ->
    [ `BLOCK | `FINISH | `FULL_FLUSH | `NO_FLUSH | `SYNC_FLUSH | `TREES ] ->
    [> `ended | `ok ]
  external inflate_close : Zlib.z_stream_inflate -> unit
    = "mlzlib_inflate_close"
  val crc32_substring : int32 -> string -> int -> int -> int32
  val crc32_string : int32 -> string -> int32
  module In_inflater = Zlib.In_inflater
  module Out_deflater = Zlib.Out_deflater
  module Out_inflater = Zlib.Out_inflater
end