Blame src/unzip.mli

rpm-build 0f2925
(*
rpm-build 0f2925
 * Unzip - inflate format decompression algorithm
rpm-build 0f2925
 * Copyright (C) 2004 Nicolas Cannasse
rpm-build 0f2925
 * Compliant with RFC 1950 and 1951
rpm-build 0f2925
 *
rpm-build 0f2925
 * This library is free software; you can redistribute it and/or
rpm-build 0f2925
 * modify it under the terms of the GNU Lesser General Public
rpm-build 0f2925
 * License as published by the Free Software Foundation; either
rpm-build 0f2925
 * version 2.1 of the License, or (at your option) any later version,
rpm-build 0f2925
 * with the special exception on linking described in file LICENSE.
rpm-build 0f2925
 *
rpm-build 0f2925
 * This library is distributed in the hope that it will be useful,
rpm-build 0f2925
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
rpm-build 0f2925
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
rpm-build 0f2925
 * Lesser General Public License for more details.
rpm-build 0f2925
 *
rpm-build 0f2925
 * You should have received a copy of the GNU Lesser General Public
rpm-build 0f2925
 * License along with this library; if not, write to the Free Software
rpm-build 0f2925
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
rpm-build 0f2925
 *)
rpm-build 0f2925
rpm-build 0f2925
(** Decompression algorithm.
rpm-build 0f2925
rpm-build 0f2925
  Unzip decompression algorithm is compliant with RFC 1950 and 1951 which
rpm-build 0f2925
  are describing the "inflate" algorithm used in most popular file formats.
rpm-build 0f2925
  This format is also the one used by the popular ZLib library.  
rpm-build 0f2925
*)
rpm-build 0f2925
rpm-build 0f2925
open ExtBytes
rpm-build 0f2925
rpm-build 0f2925
type error_msg =
rpm-build 0f2925
  | Invalid_huffman
rpm-build 0f2925
  | Invalid_data
rpm-build 0f2925
  | Invalid_crc
rpm-build 0f2925
  | Truncated_data
rpm-build 0f2925
  | Unsupported_dictionary
rpm-build 0f2925
rpm-build 0f2925
exception Error of error_msg
rpm-build 0f2925
rpm-build 0f2925
val inflate : ?header:bool -> IO.input -> IO.input
rpm-build 0f2925
(** wrap an input using "inflate" decompression algorithm. raises [Error] if
rpm-build 0f2925
  an error occurs (this can only be caused by malformed input data). *)
rpm-build 0f2925
rpm-build 0f2925
type t
rpm-build 0f2925
rpm-build 0f2925
val inflate_init : ?header:bool -> IO.input -> t
rpm-build 0f2925
val inflate_data : t -> Bytes.t -> int -> int -> int