Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
ZInflate.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "zlib.h"
#include "RConfigure.h"
#include "ZipLZMA.h"
#include "ZipLZ4.h"
Include dependency graph for ZInflate.c:

Classes

struct  huft

Macros

#define BMAX   16 /* maximum bit length of any code (16 for explode) */
#define CHECK_EOF
#define DUMPBITS(n, b, k)
#define FLUSH(n, obufptr, obufcnt, R__slide)
#define FPRINTF   fprintf
#define INFMOD   /* tell inflate.h to include code to be compiled */
#define N_MAX   288 /* maximum number of codes in any set */
#define NEEDBITS(n, b, k, ibufptr, ibufcnt)
#define NEXTBYTE   R__ReadByte()
#define NULL   0L
#define OF(a)
#define Trace(x)
#define WSIZE   0x8000 /* window size--must be a power of two, and at least */

Typedefs

typedef char boolean
typedef unsigned char uch
typedef unsigned long ulg
typedef unsigned short ush

Functions

int R__huft_build ()
int R__huft_build (unsigned *b, unsigned n, unsigned s, const ush *d, const ush *e, struct huft **t, int *m, unsigned *hufts)
int R__huft_free ()
int R__huft_free (struct huft *t)
int R__Inflate ()
int R__Inflate (uch **ibufptr, long *ibufcnt, uch **obufptr, long *obufcnt)
 Decompress a deflated entry.
int R__Inflate_block ()
int R__Inflate_block (int *e, uch **ibufptr, long *ibufcnt, uch **obufptr, long *obufcnt, ulg *bb, unsigned *bk, uch *R__slide, unsigned *wp, unsigned *hufts)
int R__Inflate_codes ()
int R__Inflate_codes (struct huft *tl, struct huft *td, int bl, int bd, uch **ibufptr, long *ibufcnt, uch **obufptr, long *obufcnt, ulg *bb, unsigned *bk, uch *R__slide, unsigned *wp)
int R__Inflate_dynamic ()
int R__Inflate_dynamic (uch **ibufptr, long *ibufcnt, uch **obufptr, long *obufcnt, ulg *bb, unsigned *bk, uch *R__slide, unsigned *wp, unsigned *hufts)
int R__Inflate_fixed ()
int R__Inflate_fixed (uch **ibufptr, long *ibufcnt, uch **obufptr, long *obufcnt, ulg *bb, unsigned *bk, uch *R__slide, unsigned *wp, unsigned *hufts)
int R__Inflate_free ()
int R__Inflate_stored ()
int R__Inflate_stored (uch **ibufptr, long *ibufcnt, uch **obufptr, long *obufcnt, ulg *bb, unsigned *bk, uch *R__slide, unsigned *wp)
static void R__WriteData ()
static void R__WriteData (int n, uch **obufptr, long *obufcnt, uch *R__slide)

Variables

static const unsigned border []
static const ush cpdext []
static const ush cpdist []
static const ush cplens []
static const ush cplext []
static const int dbits = 6
static const int lbits = 9
static const ush mask []
static const int qflag = 0
int R__fixed_bd
int R__fixed_bl
struct huftR__fixed_td
struct huftR__fixed_tl = (struct huft *) 0L

Macro Definition Documentation

◆ BMAX

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

Definition at line 393 of file ZInflate.c.

◆ CHECK_EOF

#define CHECK_EOF

Definition at line 338 of file ZInflate.c.

◆ DUMPBITS

#define DUMPBITS ( n,
b,
k )
Value:
{(b)>>=(n);(k)-=(n);}
#define b(i)
Definition RSha256.hxx:100
const Int_t n
Definition legend1.C:16

Definition at line 352 of file ZInflate.c.

◆ FLUSH

#define FLUSH ( n,
obufptr,
obufcnt,
R__slide )
Value:
R__WriteData(n,obufptr,obufcnt,R__slide) /* return value not used */
static void R__WriteData()

Definition at line 241 of file ZInflate.c.

◆ FPRINTF

#define FPRINTF   fprintf

Definition at line 237 of file ZInflate.c.

◆ INFMOD

#define INFMOD   /* tell inflate.h to include code to be compiled */

Definition at line 218 of file ZInflate.c.

◆ N_MAX

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

Definition at line 394 of file ZInflate.c.

◆ NEEDBITS

#define NEEDBITS ( n,
b,
k,
ibufptr,
ibufcnt )
Value:
{while((k)<(n)){if((ibufcnt)-- <= 0)return 1;\
(b)|=((ulg) *(ibufptr)++)<<(k);(k)+=8;}}
unsigned long ulg
Definition ZInflate.c:226

Definition at line 348 of file ZInflate.c.

◆ NEXTBYTE

#define NEXTBYTE   R__ReadByte()

Definition at line 233 of file ZInflate.c.

◆ NULL

#define NULL   0L

Definition at line 15 of file ZInflate.c.

◆ OF

#define OF ( a)
Value:
()

Definition at line 277 of file ZInflate.c.

◆ Trace

#define Trace ( x)

Definition at line 250 of file ZInflate.c.

◆ WSIZE

#define WSIZE   0x8000 /* window size--must be a power of two, and at least */

Definition at line 229 of file ZInflate.c.

Typedef Documentation

◆ boolean

typedef char boolean

Definition at line 223 of file ZInflate.c.

◆ uch

typedef unsigned char uch

Definition at line 224 of file ZInflate.c.

◆ ulg

typedef unsigned long ulg

Definition at line 226 of file ZInflate.c.

◆ ush

typedef unsigned short ush

Definition at line 225 of file ZInflate.c.

Function Documentation

◆ R__huft_build() [1/2]

int R__huft_build ( )

◆ R__huft_build() [2/2]

int R__huft_build ( unsigned * b,
unsigned n,
unsigned s,
const ush * d,
const ush * e,
struct huft ** t,
int * m,
unsigned * hufts )

Definition at line 397 of file ZInflate.c.

◆ R__huft_free() [1/2]

int R__huft_free ( )

◆ R__huft_free() [2/2]

int R__huft_free ( struct huft * t)

Definition at line 595 of file ZInflate.c.

◆ R__Inflate() [1/2]

int R__Inflate ( )

◆ R__Inflate() [2/2]

int R__Inflate ( uch ** ibufptr,
long * ibufcnt,
uch ** obufptr,
long * obufcnt )

Decompress a deflated entry.

Definition at line 1048 of file ZInflate.c.

◆ R__Inflate_block() [1/2]

int R__Inflate_block ( )

◆ R__Inflate_block() [2/2]

int R__Inflate_block ( int * e,
uch ** ibufptr,
long * ibufcnt,
uch ** obufptr,
long * obufcnt,
ulg * bb,
unsigned * bk,
uch * R__slide,
unsigned * wp,
unsigned * hufts )

Definition at line 1004 of file ZInflate.c.

◆ R__Inflate_codes() [1/2]

int R__Inflate_codes ( )

◆ R__Inflate_codes() [2/2]

int R__Inflate_codes ( struct huft * tl,
struct huft * td,
int bl,
int bd,
uch ** ibufptr,
long * ibufcnt,
uch ** obufptr,
long * obufcnt,
ulg * bb,
unsigned * bk,
uch * R__slide,
unsigned * wp )

Definition at line 623 of file ZInflate.c.

◆ R__Inflate_dynamic() [1/2]

int R__Inflate_dynamic ( )

◆ R__Inflate_dynamic() [2/2]

int R__Inflate_dynamic ( uch ** ibufptr,
long * ibufcnt,
uch ** obufptr,
long * obufcnt,
ulg * bb,
unsigned * bk,
uch * R__slide,
unsigned * wp,
unsigned * hufts )

Definition at line 839 of file ZInflate.c.

◆ R__Inflate_fixed() [1/2]

int R__Inflate_fixed ( )

◆ R__Inflate_fixed() [2/2]

int R__Inflate_fixed ( uch ** ibufptr,
long * ibufcnt,
uch ** obufptr,
long * obufcnt,
ulg * bb,
unsigned * bk,
uch * R__slide,
unsigned * wp,
unsigned * hufts )

Definition at line 791 of file ZInflate.c.

◆ R__Inflate_free()

int R__Inflate_free ( )

Definition at line 1092 of file ZInflate.c.

◆ R__Inflate_stored() [1/2]

int R__Inflate_stored ( )

◆ R__Inflate_stored() [2/2]

int R__Inflate_stored ( uch ** ibufptr,
long * ibufcnt,
uch ** obufptr,
long * obufcnt,
ulg * bb,
unsigned * bk,
uch * R__slide,
unsigned * wp )

Definition at line 733 of file ZInflate.c.

◆ R__WriteData() [1/2]

void R__WriteData ( )
static

◆ R__WriteData() [2/2]

void R__WriteData ( int n,
uch ** obufptr,
long * obufcnt,
uch * R__slide )
static

Definition at line 1115 of file ZInflate.c.

Variable Documentation

◆ border

const unsigned border[]
static
Initial value:
= {
16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}

Definition at line 292 of file ZInflate.c.

◆ cpdext

const ush cpdext[]
static
Initial value:
= {
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
12, 12, 13, 13}

Definition at line 305 of file ZInflate.c.

◆ cpdist

const ush cpdist[]
static
Initial value:
= {
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
8193, 12289, 16385, 24577}

Definition at line 301 of file ZInflate.c.

◆ cplens

const ush cplens[]
static
Initial value:
= {
3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}

Definition at line 294 of file ZInflate.c.

◆ cplext

const ush cplext[]
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99}

Definition at line 298 of file ZInflate.c.

◆ dbits

const int dbits = 6
static

Definition at line 389 of file ZInflate.c.

◆ lbits

const int lbits = 9
static

Definition at line 388 of file ZInflate.c.

◆ mask

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

Definition at line 311 of file ZInflate.c.

◆ qflag

const int qflag = 0
static

Definition at line 18 of file ZInflate.c.

◆ R__fixed_bd

int R__fixed_bd

Definition at line 789 of file ZInflate.c.

◆ R__fixed_bl

int R__fixed_bl

Definition at line 789 of file ZInflate.c.

◆ R__fixed_td

struct huft* R__fixed_td

Definition at line 788 of file ZInflate.c.

◆ R__fixed_tl

struct huft* R__fixed_tl = (struct huft *) 0L

Definition at line 787 of file ZInflate.c.