kusano fc6ab3
----------------------------------------------------------------
kusano fc6ab3
--  ZLib for Ada thick binding.                               --
kusano fc6ab3
--                                                            --
kusano fc6ab3
--  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
kusano fc6ab3
--                                                            --
kusano fc6ab3
--  Open source license information is in the zlib.ads file.  --
kusano fc6ab3
----------------------------------------------------------------
kusano fc6ab3
kusano fc6ab3
--  $Id: zlib-thin.ads,v 1.11 2004/07/23 06:33:11 vagul Exp $
kusano fc6ab3
kusano fc6ab3
with Interfaces.C.Strings;
kusano fc6ab3
kusano fc6ab3
with System;
kusano fc6ab3
kusano fc6ab3
private package ZLib.Thin is
kusano fc6ab3
kusano fc6ab3
   --  From zconf.h
kusano fc6ab3
kusano fc6ab3
   MAX_MEM_LEVEL : constant := 9;         --  zconf.h:105
kusano fc6ab3
                                          --  zconf.h:105
kusano fc6ab3
   MAX_WBITS : constant := 15;      --  zconf.h:115
kusano fc6ab3
                                    --  32K LZ77 window
kusano fc6ab3
                                    --  zconf.h:115
kusano fc6ab3
   SEEK_SET : constant := 8#0000#;  --  zconf.h:244
kusano fc6ab3
                                    --  Seek from beginning of file.
kusano fc6ab3
                                    --  zconf.h:244
kusano fc6ab3
   SEEK_CUR : constant := 1;        --  zconf.h:245
kusano fc6ab3
                                    --  Seek from current position.
kusano fc6ab3
                                    --  zconf.h:245
kusano fc6ab3
   SEEK_END : constant := 2;        --  zconf.h:246
kusano fc6ab3
                                    --  Set file pointer to EOF plus "offset"
kusano fc6ab3
                                    --  zconf.h:246
kusano fc6ab3
kusano fc6ab3
   type Byte is new Interfaces.C.unsigned_char; --  8 bits
kusano fc6ab3
                                                --  zconf.h:214
kusano fc6ab3
   type UInt is new Interfaces.C.unsigned;      --  16 bits or more
kusano fc6ab3
                                                --  zconf.h:216
kusano fc6ab3
   type Int is new Interfaces.C.int;
kusano fc6ab3
kusano fc6ab3
   type ULong is new Interfaces.C.unsigned_long;     --  32 bits or more
kusano fc6ab3
                                                     --  zconf.h:217
kusano fc6ab3
   subtype Chars_Ptr is Interfaces.C.Strings.chars_ptr;
kusano fc6ab3
kusano fc6ab3
   type ULong_Access is access ULong;
kusano fc6ab3
   type Int_Access is access Int;
kusano fc6ab3
kusano fc6ab3
   subtype Voidp is System.Address;            --  zconf.h:232
kusano fc6ab3
kusano fc6ab3
   subtype Byte_Access is Voidp;
kusano fc6ab3
kusano fc6ab3
   Nul : constant Voidp := System.Null_Address;
kusano fc6ab3
   --  end from zconf
kusano fc6ab3
kusano fc6ab3
   Z_NO_FLUSH : constant := 8#0000#;   --  zlib.h:125
kusano fc6ab3
                                       --  zlib.h:125
kusano fc6ab3
   Z_PARTIAL_FLUSH : constant := 1;       --  zlib.h:126
kusano fc6ab3
                                          --  will be removed, use
kusano fc6ab3
                                          --  Z_SYNC_FLUSH instead
kusano fc6ab3
                                          --  zlib.h:126
kusano fc6ab3
   Z_SYNC_FLUSH : constant := 2;       --  zlib.h:127
kusano fc6ab3
                                       --  zlib.h:127
kusano fc6ab3
   Z_FULL_FLUSH : constant := 3;       --  zlib.h:128
kusano fc6ab3
                                       --  zlib.h:128
kusano fc6ab3
   Z_FINISH : constant := 4;        --  zlib.h:129
kusano fc6ab3
                                    --  zlib.h:129
kusano fc6ab3
   Z_OK : constant := 8#0000#;   --  zlib.h:132
kusano fc6ab3
                                 --  zlib.h:132
kusano fc6ab3
   Z_STREAM_END : constant := 1;       --  zlib.h:133
kusano fc6ab3
                                       --  zlib.h:133
kusano fc6ab3
   Z_NEED_DICT : constant := 2;        --  zlib.h:134
kusano fc6ab3
                                       --  zlib.h:134
kusano fc6ab3
   Z_ERRNO : constant := -1;        --  zlib.h:135
kusano fc6ab3
                                    --  zlib.h:135
kusano fc6ab3
   Z_STREAM_ERROR : constant := -2;       --  zlib.h:136
kusano fc6ab3
                                          --  zlib.h:136
kusano fc6ab3
   Z_DATA_ERROR : constant := -3;      --  zlib.h:137
kusano fc6ab3
                                       --  zlib.h:137
kusano fc6ab3
   Z_MEM_ERROR : constant := -4;       --  zlib.h:138
kusano fc6ab3
                                       --  zlib.h:138
kusano fc6ab3
   Z_BUF_ERROR : constant := -5;       --  zlib.h:139
kusano fc6ab3
                                       --  zlib.h:139
kusano fc6ab3
   Z_VERSION_ERROR : constant := -6;      --  zlib.h:140
kusano fc6ab3
                                          --  zlib.h:140
kusano fc6ab3
   Z_NO_COMPRESSION : constant := 8#0000#;   --  zlib.h:145
kusano fc6ab3
                                             --  zlib.h:145
kusano fc6ab3
   Z_BEST_SPEED : constant := 1;       --  zlib.h:146
kusano fc6ab3
                                       --  zlib.h:146
kusano fc6ab3
   Z_BEST_COMPRESSION : constant := 9;       --  zlib.h:147
kusano fc6ab3
                                             --  zlib.h:147
kusano fc6ab3
   Z_DEFAULT_COMPRESSION : constant := -1;      --  zlib.h:148
kusano fc6ab3
                                                --  zlib.h:148
kusano fc6ab3
   Z_FILTERED : constant := 1;      --  zlib.h:151
kusano fc6ab3
                                    --  zlib.h:151
kusano fc6ab3
   Z_HUFFMAN_ONLY : constant := 2;        --  zlib.h:152
kusano fc6ab3
                                          --  zlib.h:152
kusano fc6ab3
   Z_DEFAULT_STRATEGY : constant := 8#0000#; --  zlib.h:153
kusano fc6ab3
                                             --  zlib.h:153
kusano fc6ab3
   Z_BINARY : constant := 8#0000#;  --  zlib.h:156
kusano fc6ab3
                                    --  zlib.h:156
kusano fc6ab3
   Z_ASCII : constant := 1;      --  zlib.h:157
kusano fc6ab3
                                 --  zlib.h:157
kusano fc6ab3
   Z_UNKNOWN : constant := 2;       --  zlib.h:158
kusano fc6ab3
                                    --  zlib.h:158
kusano fc6ab3
   Z_DEFLATED : constant := 8;      --  zlib.h:161
kusano fc6ab3
                                    --  zlib.h:161
kusano fc6ab3
   Z_NULL : constant := 8#0000#; --  zlib.h:164
kusano fc6ab3
                                 --  for initializing zalloc, zfree, opaque
kusano fc6ab3
                                 --  zlib.h:164
kusano fc6ab3
   type gzFile is new Voidp;                  --  zlib.h:646
kusano fc6ab3
kusano fc6ab3
   type Z_Stream is private;
kusano fc6ab3
kusano fc6ab3
   type Z_Streamp is access all Z_Stream;     --  zlib.h:89
kusano fc6ab3
kusano fc6ab3
   type alloc_func is access function
kusano fc6ab3
     (Opaque : Voidp;
kusano fc6ab3
      Items  : UInt;
kusano fc6ab3
      Size   : UInt)
kusano fc6ab3
      return Voidp; --  zlib.h:63
kusano fc6ab3
kusano fc6ab3
   type free_func is access procedure (opaque : Voidp; address : Voidp);
kusano fc6ab3
kusano fc6ab3
   function zlibVersion return Chars_Ptr;
kusano fc6ab3
kusano fc6ab3
   function Deflate (strm : Z_Streamp; flush : Int) return Int;
kusano fc6ab3
kusano fc6ab3
   function DeflateEnd (strm : Z_Streamp) return Int;
kusano fc6ab3
kusano fc6ab3
   function Inflate (strm : Z_Streamp; flush : Int) return Int;
kusano fc6ab3
kusano fc6ab3
   function InflateEnd (strm : Z_Streamp) return Int;
kusano fc6ab3
kusano fc6ab3
   function deflateSetDictionary
kusano fc6ab3
     (strm       : Z_Streamp;
kusano fc6ab3
      dictionary : Byte_Access;
kusano fc6ab3
      dictLength : UInt)
kusano fc6ab3
      return       Int;
kusano fc6ab3
kusano fc6ab3
   function deflateCopy (dest : Z_Streamp; source : Z_Streamp) return Int;
kusano fc6ab3
   --  zlib.h:478
kusano fc6ab3
kusano fc6ab3
   function deflateReset (strm : Z_Streamp) return Int; -- zlib.h:495
kusano fc6ab3
kusano fc6ab3
   function deflateParams
kusano fc6ab3
     (strm     : Z_Streamp;
kusano fc6ab3
      level    : Int;
kusano fc6ab3
      strategy : Int)
kusano fc6ab3
      return     Int;       -- zlib.h:506
kusano fc6ab3
kusano fc6ab3
   function inflateSetDictionary
kusano fc6ab3
     (strm       : Z_Streamp;
kusano fc6ab3
      dictionary : Byte_Access;
kusano fc6ab3
      dictLength : UInt)
kusano fc6ab3
      return       Int; --  zlib.h:548
kusano fc6ab3
kusano fc6ab3
   function inflateSync (strm : Z_Streamp) return Int;  --  zlib.h:565
kusano fc6ab3
kusano fc6ab3
   function inflateReset (strm : Z_Streamp) return Int; --  zlib.h:580
kusano fc6ab3
kusano fc6ab3
   function compress
kusano fc6ab3
     (dest      : Byte_Access;
kusano fc6ab3
      destLen   : ULong_Access;
kusano fc6ab3
      source    : Byte_Access;
kusano fc6ab3
      sourceLen : ULong)
kusano fc6ab3
      return      Int;           -- zlib.h:601
kusano fc6ab3
kusano fc6ab3
   function compress2
kusano fc6ab3
     (dest      : Byte_Access;
kusano fc6ab3
      destLen   : ULong_Access;
kusano fc6ab3
      source    : Byte_Access;
kusano fc6ab3
      sourceLen : ULong;
kusano fc6ab3
      level     : Int)
kusano fc6ab3
      return      Int;          -- zlib.h:615
kusano fc6ab3
kusano fc6ab3
   function uncompress
kusano fc6ab3
     (dest      : Byte_Access;
kusano fc6ab3
      destLen   : ULong_Access;
kusano fc6ab3
      source    : Byte_Access;
kusano fc6ab3
      sourceLen : ULong)
kusano fc6ab3
      return      Int;
kusano fc6ab3
kusano fc6ab3
   function gzopen (path : Chars_Ptr; mode : Chars_Ptr) return gzFile;
kusano fc6ab3
kusano fc6ab3
   function gzdopen (fd : Int; mode : Chars_Ptr) return gzFile;
kusano fc6ab3
kusano fc6ab3
   function gzsetparams
kusano fc6ab3
     (file     : gzFile;
kusano fc6ab3
      level    : Int;
kusano fc6ab3
      strategy : Int)
kusano fc6ab3
      return     Int;
kusano fc6ab3
kusano fc6ab3
   function gzread
kusano fc6ab3
     (file : gzFile;
kusano fc6ab3
      buf  : Voidp;
kusano fc6ab3
      len  : UInt)
kusano fc6ab3
      return Int;
kusano fc6ab3
kusano fc6ab3
   function gzwrite
kusano fc6ab3
     (file : in gzFile;
kusano fc6ab3
      buf  : in Voidp;
kusano fc6ab3
      len  : in UInt)
kusano fc6ab3
      return Int;
kusano fc6ab3
kusano fc6ab3
   function gzprintf (file : in gzFile; format : in Chars_Ptr) return Int;
kusano fc6ab3
kusano fc6ab3
   function gzputs (file : in gzFile; s : in Chars_Ptr) return Int;
kusano fc6ab3
kusano fc6ab3
   function gzgets
kusano fc6ab3
     (file : gzFile;
kusano fc6ab3
      buf  : Chars_Ptr;
kusano fc6ab3
      len  : Int)
kusano fc6ab3
      return Chars_Ptr;
kusano fc6ab3
kusano fc6ab3
   function gzputc (file : gzFile; char : Int) return Int;
kusano fc6ab3
kusano fc6ab3
   function gzgetc (file : gzFile) return Int;
kusano fc6ab3
kusano fc6ab3
   function gzflush (file : gzFile; flush : Int) return Int;
kusano fc6ab3
kusano fc6ab3
   function gzseek
kusano fc6ab3
     (file   : gzFile;
kusano fc6ab3
      offset : Int;
kusano fc6ab3
      whence : Int)
kusano fc6ab3
      return   Int;
kusano fc6ab3
kusano fc6ab3
   function gzrewind (file : gzFile) return Int;
kusano fc6ab3
kusano fc6ab3
   function gztell (file : gzFile) return Int;
kusano fc6ab3
kusano fc6ab3
   function gzeof (file : gzFile) return Int;
kusano fc6ab3
kusano fc6ab3
   function gzclose (file : gzFile) return Int;
kusano fc6ab3
kusano fc6ab3
   function gzerror (file : gzFile; errnum : Int_Access) return Chars_Ptr;
kusano fc6ab3
kusano fc6ab3
   function adler32
kusano fc6ab3
     (adler : ULong;
kusano fc6ab3
      buf   : Byte_Access;
kusano fc6ab3
      len   : UInt)
kusano fc6ab3
      return  ULong;
kusano fc6ab3
kusano fc6ab3
   function crc32
kusano fc6ab3
     (crc  : ULong;
kusano fc6ab3
      buf  : Byte_Access;
kusano fc6ab3
      len  : UInt)
kusano fc6ab3
      return ULong;
kusano fc6ab3
kusano fc6ab3
   function deflateInit
kusano fc6ab3
     (strm        : Z_Streamp;
kusano fc6ab3
      level       : Int;
kusano fc6ab3
      version     : Chars_Ptr;
kusano fc6ab3
      stream_size : Int)
kusano fc6ab3
      return        Int;
kusano fc6ab3
kusano fc6ab3
   function deflateInit2
kusano fc6ab3
     (strm        : Z_Streamp;
kusano fc6ab3
      level       : Int;
kusano fc6ab3
      method      : Int;
kusano fc6ab3
      windowBits  : Int;
kusano fc6ab3
      memLevel    : Int;
kusano fc6ab3
      strategy    : Int;
kusano fc6ab3
      version     : Chars_Ptr;
kusano fc6ab3
      stream_size : Int)
kusano fc6ab3
      return        Int;
kusano fc6ab3
kusano fc6ab3
   function Deflate_Init
kusano fc6ab3
     (strm       : Z_Streamp;
kusano fc6ab3
      level      : Int;
kusano fc6ab3
      method     : Int;
kusano fc6ab3
      windowBits : Int;
kusano fc6ab3
      memLevel   : Int;
kusano fc6ab3
      strategy   : Int)
kusano fc6ab3
      return       Int;
kusano fc6ab3
   pragma Inline (Deflate_Init);
kusano fc6ab3
kusano fc6ab3
   function inflateInit
kusano fc6ab3
     (strm        : Z_Streamp;
kusano fc6ab3
      version     : Chars_Ptr;
kusano fc6ab3
      stream_size : Int)
kusano fc6ab3
      return        Int;
kusano fc6ab3
kusano fc6ab3
   function inflateInit2
kusano fc6ab3
     (strm        : in Z_Streamp;
kusano fc6ab3
      windowBits  : in Int;
kusano fc6ab3
      version     : in Chars_Ptr;
kusano fc6ab3
      stream_size : in Int)
kusano fc6ab3
      return      Int;
kusano fc6ab3
kusano fc6ab3
   function inflateBackInit
kusano fc6ab3
     (strm        : in Z_Streamp;
kusano fc6ab3
      windowBits  : in Int;
kusano fc6ab3
      window      : in Byte_Access;
kusano fc6ab3
      version     : in Chars_Ptr;
kusano fc6ab3
      stream_size : in Int)
kusano fc6ab3
      return      Int;
kusano fc6ab3
   --  Size of window have to be 2**windowBits.
kusano fc6ab3
kusano fc6ab3
   function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int;
kusano fc6ab3
   pragma Inline (Inflate_Init);
kusano fc6ab3
kusano fc6ab3
   function zError (err : Int) return Chars_Ptr;
kusano fc6ab3
kusano fc6ab3
   function inflateSyncPoint (z : Z_Streamp) return Int;
kusano fc6ab3
kusano fc6ab3
   function get_crc_table return ULong_Access;
kusano fc6ab3
kusano fc6ab3
   --  Interface to the available fields of the z_stream structure.
kusano fc6ab3
   --  The application must update next_in and avail_in when avail_in has
kusano fc6ab3
   --  dropped to zero. It must update next_out and avail_out when avail_out
kusano fc6ab3
   --  has dropped to zero. The application must initialize zalloc, zfree and
kusano fc6ab3
   --  opaque before calling the init function.
kusano fc6ab3
kusano fc6ab3
   procedure Set_In
kusano fc6ab3
     (Strm   : in out Z_Stream;
kusano fc6ab3
      Buffer : in Voidp;
kusano fc6ab3
      Size   : in UInt);
kusano fc6ab3
   pragma Inline (Set_In);
kusano fc6ab3
kusano fc6ab3
   procedure Set_Out
kusano fc6ab3
     (Strm   : in out Z_Stream;
kusano fc6ab3
      Buffer : in Voidp;
kusano fc6ab3
      Size   : in UInt);
kusano fc6ab3
   pragma Inline (Set_Out);
kusano fc6ab3
kusano fc6ab3
   procedure Set_Mem_Func
kusano fc6ab3
     (Strm   : in out Z_Stream;
kusano fc6ab3
      Opaque : in Voidp;
kusano fc6ab3
      Alloc  : in alloc_func;
kusano fc6ab3
      Free   : in free_func);
kusano fc6ab3
   pragma Inline (Set_Mem_Func);
kusano fc6ab3
kusano fc6ab3
   function Last_Error_Message (Strm : in Z_Stream) return String;
kusano fc6ab3
   pragma Inline (Last_Error_Message);
kusano fc6ab3
kusano fc6ab3
   function Avail_Out (Strm : in Z_Stream) return UInt;
kusano fc6ab3
   pragma Inline (Avail_Out);
kusano fc6ab3
kusano fc6ab3
   function Avail_In (Strm : in Z_Stream) return UInt;
kusano fc6ab3
   pragma Inline (Avail_In);
kusano fc6ab3
kusano fc6ab3
   function Total_In (Strm : in Z_Stream) return ULong;
kusano fc6ab3
   pragma Inline (Total_In);
kusano fc6ab3
kusano fc6ab3
   function Total_Out (Strm : in Z_Stream) return ULong;
kusano fc6ab3
   pragma Inline (Total_Out);
kusano fc6ab3
kusano fc6ab3
   function inflateCopy
kusano fc6ab3
     (dest   : in Z_Streamp;
kusano fc6ab3
      Source : in Z_Streamp)
kusano fc6ab3
      return Int;
kusano fc6ab3
kusano fc6ab3
   function compressBound (Source_Len : in ULong) return ULong;
kusano fc6ab3
kusano fc6ab3
   function deflateBound
kusano fc6ab3
     (Strm       : in Z_Streamp;
kusano fc6ab3
      Source_Len : in ULong)
kusano fc6ab3
      return     ULong;
kusano fc6ab3
kusano fc6ab3
   function gzungetc (C : in Int; File : in  gzFile) return Int;
kusano fc6ab3
kusano fc6ab3
   function zlibCompileFlags return ULong;
kusano fc6ab3
kusano fc6ab3
private
kusano fc6ab3
kusano fc6ab3
   type Z_Stream is record            -- zlib.h:68
kusano fc6ab3
      Next_In   : Voidp      := Nul;  -- next input byte
kusano fc6ab3
      Avail_In  : UInt       := 0;    -- number of bytes available at next_in
kusano fc6ab3
      Total_In  : ULong      := 0;    -- total nb of input bytes read so far
kusano fc6ab3
      Next_Out  : Voidp      := Nul;  -- next output byte should be put there
kusano fc6ab3
      Avail_Out : UInt       := 0;    -- remaining free space at next_out
kusano fc6ab3
      Total_Out : ULong      := 0;    -- total nb of bytes output so far
kusano fc6ab3
      msg       : Chars_Ptr;          -- last error message, NULL if no error
kusano fc6ab3
      state     : Voidp;              -- not visible by applications
kusano fc6ab3
      zalloc    : alloc_func := null; -- used to allocate the internal state
kusano fc6ab3
      zfree     : free_func  := null; -- used to free the internal state
kusano fc6ab3
      opaque    : Voidp;              -- private data object passed to
kusano fc6ab3
                                      --  zalloc and zfree
kusano fc6ab3
      data_type : Int;                -- best guess about the data type:
kusano fc6ab3
                                      --  ascii or binary
kusano fc6ab3
      adler     : ULong;              -- adler32 value of the uncompressed
kusano fc6ab3
                                      --  data
kusano fc6ab3
      reserved  : ULong;              -- reserved for future use
kusano fc6ab3
   end record;
kusano fc6ab3
kusano fc6ab3
   pragma Convention (C, Z_Stream);
kusano fc6ab3
kusano fc6ab3
   pragma Import (C, zlibVersion, "zlibVersion");
kusano fc6ab3
   pragma Import (C, Deflate, "deflate");
kusano fc6ab3
   pragma Import (C, DeflateEnd, "deflateEnd");
kusano fc6ab3
   pragma Import (C, Inflate, "inflate");
kusano fc6ab3
   pragma Import (C, InflateEnd, "inflateEnd");
kusano fc6ab3
   pragma Import (C, deflateSetDictionary, "deflateSetDictionary");
kusano fc6ab3
   pragma Import (C, deflateCopy, "deflateCopy");
kusano fc6ab3
   pragma Import (C, deflateReset, "deflateReset");
kusano fc6ab3
   pragma Import (C, deflateParams, "deflateParams");
kusano fc6ab3
   pragma Import (C, inflateSetDictionary, "inflateSetDictionary");
kusano fc6ab3
   pragma Import (C, inflateSync, "inflateSync");
kusano fc6ab3
   pragma Import (C, inflateReset, "inflateReset");
kusano fc6ab3
   pragma Import (C, compress, "compress");
kusano fc6ab3
   pragma Import (C, compress2, "compress2");
kusano fc6ab3
   pragma Import (C, uncompress, "uncompress");
kusano fc6ab3
   pragma Import (C, gzopen, "gzopen");
kusano fc6ab3
   pragma Import (C, gzdopen, "gzdopen");
kusano fc6ab3
   pragma Import (C, gzsetparams, "gzsetparams");
kusano fc6ab3
   pragma Import (C, gzread, "gzread");
kusano fc6ab3
   pragma Import (C, gzwrite, "gzwrite");
kusano fc6ab3
   pragma Import (C, gzprintf, "gzprintf");
kusano fc6ab3
   pragma Import (C, gzputs, "gzputs");
kusano fc6ab3
   pragma Import (C, gzgets, "gzgets");
kusano fc6ab3
   pragma Import (C, gzputc, "gzputc");
kusano fc6ab3
   pragma Import (C, gzgetc, "gzgetc");
kusano fc6ab3
   pragma Import (C, gzflush, "gzflush");
kusano fc6ab3
   pragma Import (C, gzseek, "gzseek");
kusano fc6ab3
   pragma Import (C, gzrewind, "gzrewind");
kusano fc6ab3
   pragma Import (C, gztell, "gztell");
kusano fc6ab3
   pragma Import (C, gzeof, "gzeof");
kusano fc6ab3
   pragma Import (C, gzclose, "gzclose");
kusano fc6ab3
   pragma Import (C, gzerror, "gzerror");
kusano fc6ab3
   pragma Import (C, adler32, "adler32");
kusano fc6ab3
   pragma Import (C, crc32, "crc32");
kusano fc6ab3
   pragma Import (C, deflateInit, "deflateInit_");
kusano fc6ab3
   pragma Import (C, inflateInit, "inflateInit_");
kusano fc6ab3
   pragma Import (C, deflateInit2, "deflateInit2_");
kusano fc6ab3
   pragma Import (C, inflateInit2, "inflateInit2_");
kusano fc6ab3
   pragma Import (C, zError, "zError");
kusano fc6ab3
   pragma Import (C, inflateSyncPoint, "inflateSyncPoint");
kusano fc6ab3
   pragma Import (C, get_crc_table, "get_crc_table");
kusano fc6ab3
kusano fc6ab3
   --  since zlib 1.2.0:
kusano fc6ab3
kusano fc6ab3
   pragma Import (C, inflateCopy, "inflateCopy");
kusano fc6ab3
   pragma Import (C, compressBound, "compressBound");
kusano fc6ab3
   pragma Import (C, deflateBound, "deflateBound");
kusano fc6ab3
   pragma Import (C, gzungetc, "gzungetc");
kusano fc6ab3
   pragma Import (C, zlibCompileFlags, "zlibCompileFlags");
kusano fc6ab3
kusano fc6ab3
   pragma Import (C, inflateBackInit, "inflateBackInit_");
kusano fc6ab3
kusano fc6ab3
   --  I stopped binding the inflateBack routines, becouse realize that
kusano fc6ab3
   --  it does not support zlib and gzip headers for now, and have no
kusano fc6ab3
   --  symmetric deflateBack routines.
kusano fc6ab3
   --  ZLib-Ada is symmetric regarding deflate/inflate data transformation
kusano fc6ab3
   --  and has a similar generic callback interface for the
kusano fc6ab3
   --  deflate/inflate transformation based on the regular Deflate/Inflate
kusano fc6ab3
   --  routines.
kusano fc6ab3
kusano fc6ab3
   --  pragma Import (C, inflateBack, "inflateBack");
kusano fc6ab3
   --  pragma Import (C, inflateBackEnd, "inflateBackEnd");
kusano fc6ab3
kusano fc6ab3
end ZLib.Thin;