; _______________________________________________________________________________________
;|                                                                                       |
;| ..::FreshLib::..  Free, open source. Licensed under "BSD 2-clause" license."          |
;|_______________________________________________________________________________________|
;
;  Description: Constants and structures definitions for ZLIB library.
;
;  Target OS: Any
;
;  Dependencies:
;
;  Notes:
;_________________________________________________________________________________________

; zlib.h -- interface of the 'zlib' general purpose compression library
;  version 1.2.3, July 18th, 2005
;
;  Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
;
;  This software is provided 'as-is', without any express or implied
;  warranty.  In no event will the authors be held liable for any damages
;  arising from the use of this software.
;
;  Permission is granted to anyone to use this software for any purpose,
;  including commercial applications, and to alter it and redistribute it
;  freely, subject to the following restrictions:
;
;  1. The origin of this software must not be misrepresented; you must not
;     claim that you wrote the original software. If you use this software
;     in a product, an acknowledgment in the product documentation would be
;     appreciated but is not required.
;  2. Altered source versions must be plainly marked as such, and must not be
;     misrepresented as being the original software.
;  3. This notice may not be removed or altered from any source distribution.
;
;  Jean-loup Gailly        Mark Adler
;  jloup@gzip.org          madler@alumni.caltech.edu
;
;
;  The data format used by the zlib library is described by RFCs (Request for
;  Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
;  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
;


; zconf.h -- configuration of the zlib compression library
; Copyright (C) 1995-2005 Jean-loup Gailly.
; For conditions of distribution and use, see copyright notice in zlib.h
;

MAX_MEM_LEVEL = 9
MAX_WBITS     = 15 ; 32K LZ77 window

ZLIB_VERSION equ "1.2.3"
ZLIB_VERNUM = $1230


struct z_stream

    ptrNextIn   dd      ?    ;  next input byte
    AvailIn     dd      ?    ;  number of bytes available at next_in
    TotalIn     dd  ?    ;  total nb of input bytes read so far

    ptrNextOut  dd  ?    ;  next output byte should be put there
    AvailOut    dd  ?    ;  remaining free space at next_out
    TotalOut    dd  ?    ;  total nb of bytes output so far

    ptrMsg      dd  ?    ;  last error message, NULL if no error

    ptrState    dd  ?    ;  not visible by applications

    zalloc      dd  ?    ;  used to allocate the internal state
    zfree       dd  ?    ;  used to free the internal state
    opaque      dd  ?    ;  private data object passed to zalloc and zfree

    data_type   dd  ?    ;  best guess about the data type: binary or text
    adler       dd  ?    ;  adler32 value of the uncompressed data
    reserved    dd  ?    ;  reserved for future use
ends


; constants

; Allowed flush values; see deflate() and inflate() below for details
Z_NO_FLUSH      =       0
Z_PARTIAL_FLUSH =       1       ; will be removed, use Z_SYNC_FLUSH instead
Z_SYNC_FLUSH    =       2
Z_FULL_FLUSH    =       3
Z_FINISH        =       4
Z_BLOCK         =       5

; Return codes for the compression/decompression functions. Negative
; values are errors, positive values are used for special but normal events.

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

; compression levels
Z_NO_COMPRESSION        =       0
Z_BEST_SPEED            =       1
Z_BEST_COMPRESSION      =       9
Z_DEFAULT_COMPRESSION   =       -1

; compression strategy; see deflateInit2() below for details */

Z_FILTERED              =       1
Z_HUFFMAN_ONLY          =       2
Z_RLE                   =       3
Z_FIXED                 =       4
Z_DEFAULT_STRATEGY      =       0


; Possible values of the data_type field (though see inflate()) */

Z_BINARY        =       0
Z_TEXT          =       1
Z_ASCII         =       Z_TEXT   ; for compatibility with 1.2.2 and earlier
Z_UNKNOWN       =       2

; The deflate compression method (the only one supported in this version)
Z_DEFLATED      =       8

Z_NULL          =       0  ; for initializing zalloc, zfree, opaque

