Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
inflate.c File Reference
#include <linux/compiler.h>
#include "gzip.h"

Go to the source code of this file.

Data Structures

struct  huft
 

Macros

#define DEBG(x)
 
#define DEBG1(x)
 
#define STATIC
 
#define INIT
 
#define slide   window
 
#define wp   outcnt
 
#define flush_output(w)   (wp=(w),flush_window())
 
#define NEXTBYTE()   ({ int v = get_byte(); if (v < 0) goto underrun; (uch)v; })
 
#define NEEDBITS(n)   {while(k<(n)){b|=((ulg)NEXTBYTE())<<k;k+=8;}}
 
#define DUMPBITS(n)   {b>>=(n);k-=(n);}
 
#define BMAX   16 /* maximum bit length of any code (16 for explode) */
 
#define N_MAX   288 /* maximum number of codes in any set */
 
#define CRC_VALUE   (crc ^ 0xffffffffUL)
 
#define ASCII_FLAG   0x01 /* bit 0 set: file probably ASCII text */
 
#define CONTINUATION   0x02 /* bit 1 set: continuation of multi-part gzip file */
 
#define EXTRA_FIELD   0x04 /* bit 2 set: extra field present */
 
#define ORIG_NAME   0x08 /* bit 3 set: original file name present */
 
#define COMMENT   0x10 /* bit 4 set: file comment present */
 
#define ENCRYPTED   0x20 /* bit 5 set: file is encrypted */
 
#define RESERVED   0xC0 /* bit 6,7: reserved */
 

Functions

STATIC int INIT huft_build OF ((unsigned *, unsigned, unsigned, const ush *, const ush *, struct huft **, int *))
 
STATIC int INIT huft_free OF ((struct huft *))
 
STATIC int INIT inflate_codes OF ((struct huft *, struct huft *, int, int))
 
STATIC int INIT inflate_stored OF ((void))
 
STATIC int INIT inflate_block OF ((int *))
 
STATIC int INIT huft_build (unsigned *b, unsigned n, unsigned s, const ush *d, const ush *e, struct huft **t, int *m)
 
STATIC int INIT huft_free (struct huft *t)
 
STATIC int INIT inflate_codes (struct huft *tl, struct huft *td, int bl, int bd)
 
STATIC int INIT inflate_stored (void)
 
STATIC int noinline INIT inflate_fixed (void)
 
STATIC int noinline INIT inflate_dynamic (void)
 
STATIC int INIT inflate_block (int *e)
 
STATIC int INIT inflate (void)
 

Variables

STATIC ulg bb
 
STATIC unsigned bk
 
STATIC const ush mask_bits []
 
STATIC const int lbits = 9
 
STATIC const int dbits = 6
 
STATIC unsigned hufts
 

Macro Definition Documentation

#define ASCII_FLAG   0x01 /* bit 0 set: file probably ASCII text */

Definition at line 1182 of file inflate.c.

#define BMAX   16 /* maximum bit length of any code (16 for explode) */

Definition at line 314 of file inflate.c.

#define COMMENT   0x10 /* bit 4 set: file comment present */

Definition at line 1186 of file inflate.c.

#define CONTINUATION   0x02 /* bit 1 set: continuation of multi-part gzip file */

Definition at line 1183 of file inflate.c.

#define CRC_VALUE   (crc ^ 0xffffffffUL)

Definition at line 1138 of file inflate.c.

#define DEBG (   x)

Definition at line 1 of file inflate.c.

#define DEBG1 (   x)

Definition at line 2 of file inflate.c.

#define DUMPBITS (   n)    {b>>=(n);k-=(n);}

Definition at line 234 of file inflate.c.

#define ENCRYPTED   0x20 /* bit 5 set: file is encrypted */

Definition at line 1187 of file inflate.c.

#define EXTRA_FIELD   0x04 /* bit 2 set: extra field present */

Definition at line 1184 of file inflate.c.

#define flush_output (   w)    (wp=(w),flush_window())

Definition at line 170 of file inflate.c.

#define INIT

Definition at line 126 of file inflate.c.

#define N_MAX   288 /* maximum number of codes in any set */

Definition at line 315 of file inflate.c.

#define NEEDBITS (   n)    {while(k<(n)){b|=((ulg)NEXTBYTE())<<k;k+=8;}}

Definition at line 233 of file inflate.c.

#define NEXTBYTE ( )    ({ int v = get_byte(); if (v < 0) goto underrun; (uch)v; })

Definition at line 232 of file inflate.c.

#define ORIG_NAME   0x08 /* bit 3 set: original file name present */

Definition at line 1185 of file inflate.c.

#define RESERVED   0xC0 /* bit 6,7: reserved */

Definition at line 1188 of file inflate.c.

#define slide   window

Definition at line 129 of file inflate.c.

#define STATIC

Definition at line 122 of file inflate.c.

#define wp   outcnt

Definition at line 169 of file inflate.c.

Function Documentation

STATIC int INIT huft_build ( unsigned *  b,
unsigned  n,
unsigned  s,
const ush d,
const ush e,
struct huft **  t,
int m 
)

Definition at line 321 of file inflate.c.

STATIC int INIT huft_free ( struct huft t)

Definition at line 566 of file inflate.c.

STATIC int INIT inflate ( void  )

Definition at line 1084 of file inflate.c.

STATIC int INIT inflate_block ( int e)

Definition at line 1033 of file inflate.c.

STATIC int INIT inflate_codes ( struct huft tl,
struct huft td,
int  bl,
int  bd 
)

Definition at line 588 of file inflate.c.

STATIC int noinline INIT inflate_dynamic ( void  )

Definition at line 828 of file inflate.c.

STATIC int noinline INIT inflate_fixed ( void  )

Definition at line 764 of file inflate.c.

STATIC int INIT inflate_stored ( void  )

Definition at line 703 of file inflate.c.

STATIC int INIT huft_build OF ( (unsigned *, unsigned, unsigned, const ush *, const ush *, struct huft **, int *)  )
STATIC int INIT inflate OF ( (void )

Variable Documentation

STATIC ulg bb

Definition at line 223 of file inflate.c.

STATIC unsigned bk

Definition at line 224 of file inflate.c.

STATIC const int dbits = 6

Definition at line 310 of file inflate.c.

STATIC unsigned hufts

Definition at line 318 of file inflate.c.

STATIC const int lbits = 9

Definition at line 309 of file inflate.c.

STATIC const ush mask_bits[]
Initial value:
= {
0x0000,
0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
}

Definition at line 226 of file inflate.c.