annotate src/zlib-1.2.8/contrib/infback9/inflate9.h @ 155:54abead6ecce

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