| Description | uses | Classes, Interfaces, Objects and Records | Functions and Procedures | Types | Constants | Variables |
Bindings to zlib library.
Copied from FPC zlib.pp in packages. Changed by Kambi to
link to zlib1.dll under Windows (from [http://gnuwin32.sourceforge.net/]), this uses cdecl calling convention
compile under Delphi too
name changed from zlib to KambiZlib to not collide with FPC and Kylix zlib units
changed to link using my TDynLib instead of linking with "external libz ..."
just like KambiPng: zlib library must not be actually present on target system. If zlib will not be installed, KambiZlibInited will be simply set to false.
| Name | Description |
|---|---|
record TInternalState |
|
record TZStream |
function zlibVersion:string; |
function deflateInit(var strm:TZStream;level : longint) : longint; |
function inflateInit(var strm:TZStream) : longint; |
function deflateInit2(var strm:TZStream;level,method,windowBits,memLevel,strategy : longint) : longint; |
function inflateInit2(var strm:TZStream;windowBits : longint) : longint; |
function zError(err:longint):string; |
function KambiZlibInited: boolean; |
Uint = Longint; |
Ulong = Longint; |
Ulongf = Longint; |
Pulongf = ˆUlongf; |
z_off_t = longint; |
pbyte = ˆbyte; |
pbytef = ˆbyte; |
TAllocfunc = function (opaque:pointer; items:uInt; size:uInt):pointer; cdecl; |
TFreeFunc = procedure (opaque:pointer; address:pointer); cdecl; |
PInternalState = ˆTInternalstate; |
PZstream = ˆTZStream; |
gzFile = pointer; |
ZLIB_VERSION = '1.1.3'; |
ZLibraryName =
'libz.so.1'
; |
Z_NO_FLUSH = 0; |
Z_PARTIAL_FLUSH = 1; |
Z_SYNC_FLUSH = 2; |
Z_FULL_FLUSH = 3; |
Z_FINISH = 4; |
Z_OK = 0; |
Z_STREAM_END = 1; |
Z_NEED_DICT = 2; |
Z_ERRNO = -(1); |
Z_STREAM_ERROR = -(2); |
Z_DATA_ERROR = -(3); |
Z_MEM_ERROR = -(4); |
Z_BUF_ERROR = -(5); |
Z_VERSION_ERROR = -(6); |
Z_NO_COMPRESSION = 0; |
Z_BEST_SPEED = 1; |
Z_BEST_COMPRESSION = 9; |
Z_DEFAULT_COMPRESSION = -(1); |
Z_FILTERED = 1; |
Z_HUFFMAN_ONLY = 2; |
Z_DEFAULT_STRATEGY = 0; |
Z_BINARY = 0; |
Z_ASCII = 1; |
Z_UNKNOWN = 2; |
Z_DEFLATED = 8; |
Z_NULL = 0; |
zlibVersionpchar: function:pchar; cdecl; |
deflate: function(var strm:TZStream; flush:longint):longint; cdecl; |
deflateEnd: function(var strm:TZStream):longint; cdecl; |
inflate: function(var strm:TZStream; flush:longint):longint; cdecl; |
inflateEnd: function(var strm:TZStream):longint; cdecl; |
deflateSetDictionary: function(var strm:TZStream;dictionary : pbytef; dictLength:uInt):longint; cdecl; |
deflateCopy: function(var dest,source:TZstream):longint; cdecl; |
deflateReset: function(var strm:TZStream):longint; cdecl; |
deflateParams: function(var strm:TZStream; level:longint; strategy:longint):longint; cdecl; |
inflateSetDictionary: function(var strm:TZStream;dictionary : pbytef; dictLength:uInt):longint; cdecl; |
inflateSync: function(var strm:TZStream):longint; cdecl; |
inflateReset: function(var strm:TZStream):longint; cdecl; |
compress: function(dest:pbytef;destLen:uLongf; source : pbytef; sourceLen:uLong):longint; cdecl; |
compress2: function(dest:pbytef;destLen:uLongf; source : pbytef; sourceLen:uLong; level:longint):longint; cdecl; |
uncompress: function(dest:pbytef;destLen:uLongf; source : pbytef; sourceLen:uLong):longint; cdecl; |
gzopen: function(path:pchar; mode:pchar):gzFile; cdecl; |
gzdopen: function(fd:longint; mode:pchar):gzFile; cdecl; |
gzsetparams: function(thefile:gzFile; level:longint; strategy:longint):longint; cdecl; |
gzread: function(thefile:gzFile; buf:pointer; len:cardinal):longint; cdecl; |
gzwrite: function(thefile:gzFile; buf:pointer; len:cardinal):longint; cdecl; |
gzputs: function(thefile:gzFile; s:pbytef):longint; cdecl; |
gzgets: function(thefile:gzFile; buf:pbytef; len:longint):pbytef; cdecl; |
gzputc: function(thefile:gzFile; c:char):char; cdecl; |
gzgetc: function(thefile:gzFile):char; cdecl; |
gzflush: function(thefile:gzFile; flush:longint):longint; cdecl; |
gzseek: function(thefile:gzFile; offset:z_off_t; whence:longint):z_off_t; cdecl; |
gzrewind: function(thefile:gzFile):longint; cdecl; |
gztell: function(thefile:gzFile):z_off_t; cdecl; |
gzeof: function(thefile:gzFile):longbool; cdecl; |
gzclose: function(thefile:gzFile):longint; cdecl; |
gzerror: function(thefile:gzFile; var errnum:longint):pbytef; cdecl; |
adler32: function(adler:uLong;buf : pbytef; len:uInt):uLong; cdecl; |
crc32: function(crc:uLong;buf : pbytef; len:uInt):uLong; cdecl; |
deflateInit_: function(var strm:TZStream; level:longint; version:pchar; stream_size:longint):longint; cdecl; |
inflateInit_: function(var strm:TZStream; version:pchar; stream_size:longint):longint; cdecl; |
deflateInit2_: function(var strm:TZStream; level:longint; method:longint; windowBits:longint; memLevel:longint;strategy:longint; version:pchar; stream_size:longint):longint; cdecl; |
inflateInit2_: function(var strm:TZStream; windowBits:longint; version:pchar; stream_size:longint):longint; cdecl; |
zErrorpchar: function(err:longint):pchar; cdecl; |
inflateSyncPoint: function(z:PZstream):longint; cdecl; |
get_crc_table: function:pointer; cdecl; |
function zlibVersion:string; |
function deflateInit(var strm:TZStream;level : longint) : longint; |
function inflateInit(var strm:TZStream) : longint; |
function deflateInit2(var strm:TZStream;level,method,windowBits,memLevel,strategy : longint) : longint; |
function inflateInit2(var strm:TZStream;windowBits : longint) : longint; |
function zError(err:longint):string; |
function KambiZlibInited: boolean; |
|
Just like KambiPngInited: Returns whether zlib library was found at initialization. If true that all function pointers in this unit are inited and you can simply use zlib. If false then zlib was not installed, all function pointers in this unit are nil and you can't use anything fro zlib. |
Uint = Longint; |
Ulong = Longint; |
Ulongf = Longint; |
Pulongf = ˆUlongf; |
z_off_t = longint; |
pbyte = ˆbyte; |
pbytef = ˆbyte; |
TAllocfunc = function (opaque:pointer; items:uInt; size:uInt):pointer; cdecl; |
TFreeFunc = procedure (opaque:pointer; address:pointer); cdecl; |
PInternalState = ˆTInternalstate; |
PZstream = ˆTZStream; |
gzFile = pointer; |
ZLIB_VERSION = '1.1.3'; |
|
for linux for linking with libc |
ZLibraryName =
'libz.so.1'
; |
Z_NO_FLUSH = 0; |
Z_PARTIAL_FLUSH = 1; |
Z_SYNC_FLUSH = 2; |
Z_FULL_FLUSH = 3; |
Z_FINISH = 4; |
Z_OK = 0; |
Z_STREAM_END = 1; |
Z_NEED_DICT = 2; |
Z_ERRNO = -(1); |
Z_STREAM_ERROR = -(2); |
Z_DATA_ERROR = -(3); |
Z_MEM_ERROR = -(4); |
Z_BUF_ERROR = -(5); |
Z_VERSION_ERROR = -(6); |
Z_NO_COMPRESSION = 0; |
Z_BEST_SPEED = 1; |
Z_BEST_COMPRESSION = 9; |
Z_DEFAULT_COMPRESSION = -(1); |
Z_FILTERED = 1; |
Z_HUFFMAN_ONLY = 2; |
Z_DEFAULT_STRATEGY = 0; |
Z_BINARY = 0; |
Z_ASCII = 1; |
Z_UNKNOWN = 2; |
Z_DEFLATED = 8; |
Z_NULL = 0; |
zlibVersionpchar: function:pchar; cdecl; |
deflate: function(var strm:TZStream; flush:longint):longint; cdecl; |
deflateEnd: function(var strm:TZStream):longint; cdecl; |
inflate: function(var strm:TZStream; flush:longint):longint; cdecl; |
inflateEnd: function(var strm:TZStream):longint; cdecl; |
deflateSetDictionary: function(var strm:TZStream;dictionary : pbytef; dictLength:uInt):longint; cdecl; |
deflateCopy: function(var dest,source:TZstream):longint; cdecl; |
deflateReset: function(var strm:TZStream):longint; cdecl; |
deflateParams: function(var strm:TZStream; level:longint; strategy:longint):longint; cdecl; |
inflateSetDictionary: function(var strm:TZStream;dictionary : pbytef; dictLength:uInt):longint; cdecl; |
inflateSync: function(var strm:TZStream):longint; cdecl; |
inflateReset: function(var strm:TZStream):longint; cdecl; |
compress: function(dest:pbytef;destLen:uLongf; source : pbytef; sourceLen:uLong):longint; cdecl; |
compress2: function(dest:pbytef;destLen:uLongf; source : pbytef; sourceLen:uLong; level:longint):longint; cdecl; |
uncompress: function(dest:pbytef;destLen:uLongf; source : pbytef; sourceLen:uLong):longint; cdecl; |
gzopen: function(path:pchar; mode:pchar):gzFile; cdecl; |
gzdopen: function(fd:longint; mode:pchar):gzFile; cdecl; |
gzsetparams: function(thefile:gzFile; level:longint; strategy:longint):longint; cdecl; |
gzread: function(thefile:gzFile; buf:pointer; len:cardinal):longint; cdecl; |
gzwrite: function(thefile:gzFile; buf:pointer; len:cardinal):longint; cdecl; |
gzputs: function(thefile:gzFile; s:pbytef):longint; cdecl; |
|
gzprintf: function(thefile:gzFile; format:pbytef; args:array of const):longint;{$ifdef ZLIB_STDCALL} stdcall {$else} cdecl {$endif}; |
gzgets: function(thefile:gzFile; buf:pbytef; len:longint):pbytef; cdecl; |
gzputc: function(thefile:gzFile; c:char):char; cdecl; |
gzgetc: function(thefile:gzFile):char; cdecl; |
gzflush: function(thefile:gzFile; flush:longint):longint; cdecl; |
gzseek: function(thefile:gzFile; offset:z_off_t; whence:longint):z_off_t; cdecl; |
gzrewind: function(thefile:gzFile):longint; cdecl; |
gztell: function(thefile:gzFile):z_off_t; cdecl; |
gzeof: function(thefile:gzFile):longbool; cdecl; |
gzclose: function(thefile:gzFile):longint; cdecl; |
gzerror: function(thefile:gzFile; var errnum:longint):pbytef; cdecl; |
adler32: function(adler:uLong;buf : pbytef; len:uInt):uLong; cdecl; |
crc32: function(crc:uLong;buf : pbytef; len:uInt):uLong; cdecl; |
deflateInit_: function(var strm:TZStream; level:longint; version:pchar; stream_size:longint):longint; cdecl; |
inflateInit_: function(var strm:TZStream; version:pchar; stream_size:longint):longint; cdecl; |
deflateInit2_: function(var strm:TZStream; level:longint; method:longint; windowBits:longint; memLevel:longint;strategy:longint; version:pchar; stream_size:longint):longint; cdecl; |
inflateInit2_: function(var strm:TZStream; windowBits:longint; version:pchar; stream_size:longint):longint; cdecl; |
zErrorpchar: function(err:longint):pchar; cdecl; |
inflateSyncPoint: function(z:PZstream):longint; cdecl; |
get_crc_table: function:pointer; cdecl; |