---------------------------------------------------------------- -- ZLib for Ada thick binding. -- -- -- -- Copyright (C) 2002-2003 Dmitriy Anisimkov -- -- -- -- Open source license information is in the zlib.ads file. -- ----------------------------------------------------------------
MAX_MEM_LEVEL : constant := 9; -- zconf.h:105 -- zconf.h:105
MAX_WBITS : constant := 15; -- zconf.h:115 -- 32K LZ77 window -- zconf.h:115
SEEK_SET : constant := 8#0000#; -- zconf.h:244 -- Seek from beginning of file. -- zconf.h:244
SEEK_CUR : constant := 1; -- zconf.h:245 -- Seek from current position. -- zconf.h:245
SEEK_END : constant := 2; -- zconf.h:246 -- Set file pointer to EOF plus "offset" -- zconf.h:246
type Byte isnew Interfaces.C.unsigned_char; -- 8 bits -- zconf.h:214 type UInt isnew Interfaces.C.unsigned; -- 16 bits or more -- zconf.h:216 type Int isnew Interfaces.C.int;
type ULong isnew Interfaces.C.unsigned_long; -- 32 bits or more -- zconf.h:217 subtype Chars_Ptr is Interfaces.C.Strings.chars_ptr;
type ULong_Access isaccess ULong; type Int_Access isaccess Int;
subtype Voidp is System.Address; -- zconf.h:232
subtype Byte_Access is Voidp;
Nul : constant Voidp := System.Null_Address; -- end from zconf
function inflateInit
(strm : Z_Streamp;
version : Chars_Ptr;
stream_size : Int) return Int;
function inflateInit2
(strm : in Z_Streamp;
windowBits : in Int;
version : in Chars_Ptr;
stream_size : in Int) return Int;
function inflateBackInit
(strm : in Z_Streamp;
windowBits : in Int;
window : in Byte_Access;
version : in Chars_Ptr;
stream_size : in Int) return Int; -- Size of window have to be 2**windowBits.
function inflateSyncPoint (z : Z_Streamp) return Int;
function get_crc_table return ULong_Access;
-- Interface to the available fields of the z_stream structure. -- The application must update next_in and avail_in when avail_in has -- dropped to zero. It must update next_out and avail_out when avail_out -- has dropped to zero. The application must initialize zalloc, zfree and -- opaque before calling the init function.
procedure Set_In
(Strm : inout Z_Stream;
Buffer : in Voidp;
Size : in UInt);
pragma Inline (Set_In);
procedure Set_Out
(Strm : inout Z_Stream;
Buffer : in Voidp;
Size : in UInt);
pragma Inline (Set_Out);
procedure Set_Mem_Func
(Strm : inout Z_Stream;
Opaque : in Voidp;
Alloc : in alloc_func;
Free : in free_func);
pragma Inline (Set_Mem_Func);
function Last_Error_Message (Strm : in Z_Stream) return String;
pragma Inline (Last_Error_Message);
function Avail_Out (Strm : in Z_Stream) return UInt;
pragma Inline (Avail_Out);
function Avail_In (Strm : in Z_Stream) return UInt;
pragma Inline (Avail_In);
function Total_In (Strm : in Z_Stream) return ULong;
pragma Inline (Total_In);
function Total_Out (Strm : in Z_Stream) return ULong;
pragma Inline (Total_Out);
function inflateCopy
(dest : in Z_Streamp;
Source : in Z_Streamp) return Int;
function compressBound (Source_Len : in ULong) return ULong;
function deflateBound
(Strm : in Z_Streamp;
Source_Len : in ULong) return ULong;
function gzungetc (C : in Int; File : in gzFile) return Int;
function zlibCompileFlags return ULong;
private
type Z_Stream isrecord-- zlib.h:68
Next_In : Voidp := Nul; -- next input byte
Avail_In : UInt := 0; -- number of bytes available at next_in
Total_In : ULong := 0; -- total nb of input bytes read so far
Next_Out : Voidp := Nul; -- next output byte should be put there
Avail_Out : UInt := 0; -- remaining free space at next_out
Total_Out : ULong := 0; -- total nb of bytes output so far
msg : Chars_Ptr; -- last error message, NULL if no error
state : Voidp; -- not visible by applications
zalloc : alloc_func := null; -- used to allocate the internal state
zfree : free_func := null; -- used to free the internal state
opaque : Voidp; -- private data object passed to -- zalloc and zfree
data_type : Int; -- best guess about the data type: -- ascii or binary
adler : ULong; -- adler32 value of the uncompressed -- data
reserved : ULong; -- reserved for future use endrecord;
-- I stopped binding the inflateBack routines, because realize that -- it does not support zlib and gzip headers for now, and have no -- symmetric deflateBack routines. -- ZLib-Ada is symmetric regarding deflate/inflate data transformation -- and has a similar generic callback interface for the -- deflate/inflate transformation based on the regular Deflate/Inflate -- routines.
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.7Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.