annotate src/zlib-1.2.8/contrib/infback9/inflate9.h @ 56:af97cad61ff0

Add updated build of PortAudio for OSX
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 03 Jan 2017 15:10:52 +0000
parents 5ea0608b923f
children
rev   line source
Chris@43 1 /* inflate9.h -- internal inflate state definition
Chris@43 2 * Copyright (C) 1995-2003 Mark Adler
Chris@43 3 * For conditions of distribution and use, see copyright notice in zlib.h
Chris@43 4 */
Chris@43 5
Chris@43 6 /* WARNING: this file should *not* be used by applications. It is
Chris@43 7 part of the implementation of the compression library and is
Chris@43 8 subject to change. Applications should only use zlib.h.
Chris@43 9 */
Chris@43 10
Chris@43 11 /* Possible inflate modes between inflate() calls */
Chris@43 12 typedef enum {
Chris@43 13 TYPE, /* i: waiting for type bits, including last-flag bit */
Chris@43 14 STORED, /* i: waiting for stored size (length and complement) */
Chris@43 15 TABLE, /* i: waiting for dynamic block table lengths */
Chris@43 16 LEN, /* i: waiting for length/lit code */
Chris@43 17 DONE, /* finished check, done -- remain here until reset */
Chris@43 18 BAD /* got a data error -- remain here until reset */
Chris@43 19 } inflate_mode;
Chris@43 20
Chris@43 21 /*
Chris@43 22 State transitions between above modes -
Chris@43 23
Chris@43 24 (most modes can go to the BAD mode -- not shown for clarity)
Chris@43 25
Chris@43 26 Read deflate blocks:
Chris@43 27 TYPE -> STORED or TABLE or LEN or DONE
Chris@43 28 STORED -> TYPE
Chris@43 29 TABLE -> LENLENS -> CODELENS -> LEN
Chris@43 30 Read deflate codes:
Chris@43 31 LEN -> LEN or TYPE
Chris@43 32 */
Chris@43 33
Chris@43 34 /* state maintained between inflate() calls. Approximately 7K bytes. */
Chris@43 35 struct inflate_state {
Chris@43 36 /* sliding window */
Chris@43 37 unsigned char FAR *window; /* allocated sliding window, if needed */
Chris@43 38 /* dynamic table building */
Chris@43 39 unsigned ncode; /* number of code length code lengths */
Chris@43 40 unsigned nlen; /* number of length code lengths */
Chris@43 41 unsigned ndist; /* number of distance code lengths */
Chris@43 42 unsigned have; /* number of code lengths in lens[] */
Chris@43 43 code FAR *next; /* next available space in codes[] */
Chris@43 44 unsigned short lens[320]; /* temporary storage for code lengths */
Chris@43 45 unsigned short work[288]; /* work area for code table building */
Chris@43 46 code codes[ENOUGH]; /* space for code tables */
Chris@43 47 };