annotate src/zlib-1.2.7/contrib/infback9/inflate9.h @ 89:8a15ff55d9af

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