(* zlibpas -- Pascal interfaceto the zlib data compression library
*
* Copyright (C) 2003 Cosmin Truta.
* Derived from original sources by Bob Dellaca.
* For conditions of distribution and use, see copyright notice in readme.txt
*)
z_streamp = ^z_stream;
z_stream = packedrecord
next_in: PChar; (* next input byte *)
avail_in: Integer; (* number of bytes available at next_in *)
total_in: LongInt; (* total nb of input bytes read so far *)
next_out: PChar; (* next output byte should be put there *)
avail_out: Integer; (* remaining free space at next_out *)
total_out: LongInt; (* total nb of bytes output so far *)
msg: PChar; (* last error message, NULL if no error *)
state: Pointer; (* not visible by applications *)
zalloc: alloc_func; (* used to allocate the internal state *)
zfree: free_func; (* used to free the internal state *)
opaque: Pointer; (* private data object passed to zalloc and zfree *)
data_type: Integer; (* best guess about the data type: ascii or binary *)
adler: LongInt; (* adler32 value of the uncompressed data *)
reserved: LongInt; (* reserved for future use *) end;
gz_headerp = ^gz_header;
gz_header = packedrecord
text: Integer; (* true if compressed data believed to be text *)
time: LongInt; (* modification time *)
xflags: Integer; (* extra flags (not used when writing a gzip file) *)
os: Integer; (* operating system *)
extra: PChar; (* pointer to extra field or Z_NULL if none *)
extra_len: Integer; (* extra field length (valid if extra != Z_NULL) *)
extra_max: Integer; (* space at extra (only when reading header) *)
name: PChar; (* pointer to zero-terminated file name or Z_NULL *)
name_max: Integer; (* space at name (only when reading header) *)
comment: PChar; (* pointer to zero-terminated comment or Z_NULL *)
comm_max: Integer; (* space at comment (only when reading header) *)
hcrc: Integer; (* true if there was or will be a header crc *)
done: Integer; (* true when done reading gzip header *) end;
function adler32; external; function adler32_combine; external; function compress; external; function compress2; external; function compressBound; external; function crc32; external; function crc32_combine; external; function deflate; external; function deflateBound; external; function deflateCopy; external; function deflateEnd; external; function deflateInit_; external; function deflateInit2_; external; function deflateParams; external; function deflatePending; external; function deflatePrime; external; function deflateReset; external; function deflateSetDictionary; external; function deflateSetHeader; external; function deflateTune; external; function inflate; external; function inflateBack; external; function inflateBackEnd; external; function inflateBackInit_; external; function inflateCopy; external; function inflateEnd; external; function inflateGetHeader; external; function inflateInit_; external; function inflateInit2_; external; function inflateMark; external; function inflatePrime; external; function inflateReset; external; function inflateReset2; external; function inflateSetDictionary; external; function inflateSync; external; function uncompress; external; function zlibCompileFlags; external; function zlibVersion; external;
function deflateInit(var strm: z_stream; level: Integer): Integer; begin
Result := deflateInit_(strm, level, ZLIB_VERSION, sizeof(z_stream)); end;
function deflateInit2(var strm: z_stream; level, method, windowBits, memLevel,
strategy: Integer): Integer; begin
Result := deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
ZLIB_VERSION, sizeof(z_stream)); end;
function inflateInit(var strm: z_stream): Integer; begin
Result := inflateInit_(strm, ZLIB_VERSION, sizeof(z_stream)); end;
function inflateInit2(var strm: z_stream; windowBits: Integer): Integer; begin
Result := inflateInit2_(strm, windowBits, ZLIB_VERSION, sizeof(z_stream)); end;
function inflateBackInit(var strm: z_stream;
windowBits: Integer; window: PChar): Integer; begin
Result := inflateBackInit_(strm, windowBits, window,
ZLIB_VERSION, sizeof(z_stream)); end;
function _malloc(Size: Integer): Pointer; cdecl; begin
GetMem(Result, Size); end;
procedure _free(Block: Pointer); cdecl; begin
FreeMem(Block); end;
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.