diff options
author | George Hazan <george.hazan@gmail.com> | 2012-10-09 15:00:07 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-10-09 15:00:07 +0000 |
commit | 0107faa391ed5c4975aad29f2b27d605711a7698 (patch) | |
tree | eb68a75a73a7e615a3c05cc5f22ce342f5261bf9 /include/delphi/m_zlib.inc | |
parent | 5086c9d2039004aefe1bca55f73760f78b0fd698 (diff) |
missing file
git-svn-id: http://svn.miranda-ng.org/main/trunk@1845 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/delphi/m_zlib.inc')
-rw-r--r-- | include/delphi/m_zlib.inc | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/include/delphi/m_zlib.inc b/include/delphi/m_zlib.inc new file mode 100644 index 0000000000..6b1ad848e1 --- /dev/null +++ b/include/delphi/m_zlib.inc @@ -0,0 +1,116 @@ +{
+Miranda NG: the free IM client for Microsoft* Windows*
+
+Copyright 2012 Miranda NG project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_ZLIB}
+{$DEFINE M_ZLIB}
+
+const
+ ZlibDLL = 'zlib.dll';
+
+ Z_NO_FLUSH = 0; + Z_PARTIAL_FLUSH = 1; + Z_SYNC_FLUSH = 2; + Z_FULL_FLUSH = 3; + Z_FINISH = 4; + Z_BLOCK = 5; + Z_TREES = 6; + + 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_RLE = 3; + Z_FIXED = 4; + Z_DEFAULT_STRATEGY = 0; + + Z_BINARY = 0; + Z_TEXT = 1; + Z_ASCII = 1; + Z_UNKNOWN = 2; + + Z_DEFLATED = 8; +
+type
+ alloc_func = function(opaque: Pointer; items, size: Integer): Pointer; + cdecl; + free_func = procedure(opaque, address: Pointer); + cdecl; + + in_func = function(opaque: Pointer; var buf: PByte): Integer; + cdecl; + out_func = function(opaque: Pointer; buf: PByte; size: Integer): Integer; + cdecl; +
+ z_streamp = ^z_stream; + z_stream = packed record + 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; +
+function deflateInit(var strm: z_stream; level: Integer): Integer; cdecl; + external ZlibDLL name 'deflateInit';
+ +function deflate(var strm: z_stream; flush: Integer): Integer; cdecl; + external ZlibDLL name 'deflate';
+ +function deflateEnd(var strm: z_stream): Integer; cdecl; + external ZlibDLL name 'deflateEnd';
+ +function inflateInit(var strm: z_stream): Integer; cdecl; + external ZlibDLL name 'inflateInit';
+ +function inflate(var strm: z_stream; flush: Integer): Integer; cdecl; + external ZlibDLL name 'inflate';
+ +function inflateEnd(var strm: z_stream): Integer; cdecl; + external ZlibDLL name 'inflateEnd';
+
+{$ENDIF}
|