Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
bzlib_private.h File Reference
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "bzlib.h"

Go to the source code of this file.

Data Structures

struct  EState
 
struct  DState
 

Macros

#define BZ_VERSION   "1.0.8, 13-Jul-2019"
 
#define True   ((Bool)1)
 
#define False   ((Bool)0)
 
#define __inline__   /* */
 
#define AssertH(cond, errcode)
 
#define AssertD(cond, msg)
 
#define VPrintf0(zf)
 
#define VPrintf1(zf, za1)
 
#define VPrintf2(zf, za1, za2)
 
#define VPrintf3(zf, za1, za2, za3)
 
#define VPrintf4(zf, za1, za2, za3, za4)
 
#define VPrintf5(zf, za1, za2, za3, za4, za5)
 
#define BZALLOC(nnn)
 
#define BZFREE(ppp)
 
#define BZ_HDR_B   0x42 /* 'B' */
 
#define BZ_HDR_Z   0x5a /* 'Z' */
 
#define BZ_HDR_h   0x68 /* 'h' */
 
#define BZ_HDR_0   0x30 /* '0' */
 
#define BZ_MAX_ALPHA_SIZE   258
 
#define BZ_MAX_CODE_LEN   23
 
#define BZ_RUNA   0
 
#define BZ_RUNB   1
 
#define BZ_N_GROUPS   6
 
#define BZ_G_SIZE   50
 
#define BZ_N_ITERS   4
 
#define BZ_MAX_SELECTORS   (2 + (900000 / BZ_G_SIZE))
 
#define BZ_RAND_DECLS
 
#define BZ_RAND_INIT_MASK
 
#define BZ_RAND_MASK   ((s->rNToGo == 1) ? 1 : 0)
 
#define BZ_RAND_UPD_MASK
 
#define BZ_INITIALISE_CRC(crcVar)
 
#define BZ_FINALISE_CRC(crcVar)
 
#define BZ_UPDATE_CRC(crcVar, cha)
 
#define BZ_M_IDLE   1
 
#define BZ_M_RUNNING   2
 
#define BZ_M_FLUSHING   3
 
#define BZ_M_FINISHING   4
 
#define BZ_S_OUTPUT   1
 
#define BZ_S_INPUT   2
 
#define BZ_N_RADIX   2
 
#define BZ_N_QSORT   12
 
#define BZ_N_SHELL   18
 
#define BZ_N_OVERSHOOT   (BZ_N_RADIX + BZ_N_QSORT + BZ_N_SHELL + 2)
 
#define BZ_X_IDLE   1
 
#define BZ_X_OUTPUT   2
 
#define BZ_X_MAGIC_1   10
 
#define BZ_X_MAGIC_2   11
 
#define BZ_X_MAGIC_3   12
 
#define BZ_X_MAGIC_4   13
 
#define BZ_X_BLKHDR_1   14
 
#define BZ_X_BLKHDR_2   15
 
#define BZ_X_BLKHDR_3   16
 
#define BZ_X_BLKHDR_4   17
 
#define BZ_X_BLKHDR_5   18
 
#define BZ_X_BLKHDR_6   19
 
#define BZ_X_BCRC_1   20
 
#define BZ_X_BCRC_2   21
 
#define BZ_X_BCRC_3   22
 
#define BZ_X_BCRC_4   23
 
#define BZ_X_RANDBIT   24
 
#define BZ_X_ORIGPTR_1   25
 
#define BZ_X_ORIGPTR_2   26
 
#define BZ_X_ORIGPTR_3   27
 
#define BZ_X_MAPPING_1   28
 
#define BZ_X_MAPPING_2   29
 
#define BZ_X_SELECTOR_1   30
 
#define BZ_X_SELECTOR_2   31
 
#define BZ_X_SELECTOR_3   32
 
#define BZ_X_CODING_1   33
 
#define BZ_X_CODING_2   34
 
#define BZ_X_CODING_3   35
 
#define BZ_X_MTF_1   36
 
#define BZ_X_MTF_2   37
 
#define BZ_X_MTF_3   38
 
#define BZ_X_MTF_4   39
 
#define BZ_X_MTF_5   40
 
#define BZ_X_MTF_6   41
 
#define BZ_X_ENDHDR_2   42
 
#define BZ_X_ENDHDR_3   43
 
#define BZ_X_ENDHDR_4   44
 
#define BZ_X_ENDHDR_5   45
 
#define BZ_X_ENDHDR_6   46
 
#define BZ_X_CCRC_1   47
 
#define BZ_X_CCRC_2   48
 
#define BZ_X_CCRC_3   49
 
#define BZ_X_CCRC_4   50
 
#define MTFA_SIZE   4096
 
#define MTFL_SIZE   16
 
#define BZ_GET_FAST(cccc)
 
#define BZ_GET_FAST_C(cccc)
 
#define SET_LL4(i, n)
 
#define GET_LL4(i)
 
#define SET_LL(i, n)
 
#define GET_LL(i)
 
#define BZ_GET_SMALL(cccc)
 

Functions

void BZ2_bz__AssertH__fail (int errcode)
 
void BZ2_blockSort (EState *)
 
void BZ2_compressBlock (EState *, Bool)
 
void BZ2_bsInitWrite (EState *)
 
void BZ2_hbAssignCodes (Int32 *, UChar *, Int32, Int32, Int32)
 
void BZ2_hbMakeCodeLengths (UChar *, Int32 *, Int32, Int32)
 
Int32 BZ2_indexIntoF (Int32, Int32 *)
 
Int32 BZ2_decompress (DState *)
 
void BZ2_hbCreateDecodeTables (Int32 *, Int32 *, Int32 *, UChar *, Int32, Int32, Int32)
 

Variables

Int32 BZ2_rNums [512]
 
UInt32 BZ2_crc32Table [256]
 

Macro Definition Documentation

◆ __inline__

#define __inline__   /* */

◆ AssertD

#define AssertD ( cond,
msg )
Value:
/* */

◆ AssertH

#define AssertH ( cond,
errcode )
Value:
{ if (!(cond)) BZ2_bz__AssertH__fail ( errcode ); }
void BZ2_bz__AssertH__fail(int errcode)
Definition bzlib.c:45

◆ BZ_FINALISE_CRC

#define BZ_FINALISE_CRC ( crcVar)
Value:
{ \
crcVar = ~(crcVar); \
}

◆ BZ_G_SIZE

#define BZ_G_SIZE   50

◆ BZ_GET_FAST

#define BZ_GET_FAST ( cccc)
Value:
/* c_tPos is unsigned, hence test < 0 is pointless. */ \
if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) return True; \
s->tPos = s->tt[s->tPos]; \
cccc = (UChar)(s->tPos & 0xff); \
s->tPos >>= 8;
unsigned int UInt32
Definition bzlib_private.h:45
unsigned char UChar
Definition bzlib_private.h:43
#define True
Definition bzlib_private.h:49

◆ BZ_GET_FAST_C

#define BZ_GET_FAST_C ( cccc)
Value:
/* c_tPos is unsigned, hence test < 0 is pointless. */ \
if (c_tPos >= (UInt32)100000 * (UInt32)ro_blockSize100k) return True; \
c_tPos = c_tt[c_tPos]; \
cccc = (UChar)(c_tPos & 0xff); \
c_tPos >>= 8;

◆ BZ_GET_SMALL

#define BZ_GET_SMALL ( cccc)
Value:
/* c_tPos is unsigned, hence test < 0 is pointless. */ \
if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) return True; \
cccc = BZ2_indexIntoF ( s->tPos, s->cftab ); \
s->tPos = GET_LL(s->tPos);
#define GET_LL(i)
Definition bzlib_private.h:472
Int32 BZ2_indexIntoF(Int32, Int32 *)
Definition bzlib.c:814

◆ BZ_HDR_0

#define BZ_HDR_0   0x30 /* '0' */

◆ BZ_HDR_B

#define BZ_HDR_B   0x42 /* 'B' */

◆ BZ_HDR_h

#define BZ_HDR_h   0x68 /* 'h' */

◆ BZ_HDR_Z

#define BZ_HDR_Z   0x5a /* 'Z' */

◆ BZ_INITIALISE_CRC

#define BZ_INITIALISE_CRC ( crcVar)
Value:
{ \
crcVar = 0xffffffffL; \
}

◆ BZ_M_FINISHING

#define BZ_M_FINISHING   4

◆ BZ_M_FLUSHING

#define BZ_M_FLUSHING   3

◆ BZ_M_IDLE

#define BZ_M_IDLE   1

◆ BZ_M_RUNNING

#define BZ_M_RUNNING   2

◆ BZ_MAX_ALPHA_SIZE

#define BZ_MAX_ALPHA_SIZE   258

◆ BZ_MAX_CODE_LEN

#define BZ_MAX_CODE_LEN   23

◆ BZ_MAX_SELECTORS

#define BZ_MAX_SELECTORS   (2 + (900000 / BZ_G_SIZE))

◆ BZ_N_GROUPS

#define BZ_N_GROUPS   6

◆ BZ_N_ITERS

#define BZ_N_ITERS   4

◆ BZ_N_OVERSHOOT

#define BZ_N_OVERSHOOT   (BZ_N_RADIX + BZ_N_QSORT + BZ_N_SHELL + 2)

◆ BZ_N_QSORT

#define BZ_N_QSORT   12

◆ BZ_N_RADIX

#define BZ_N_RADIX   2

◆ BZ_N_SHELL

#define BZ_N_SHELL   18

◆ BZ_RAND_DECLS

#define BZ_RAND_DECLS
Value:
Int32 rNToGo; \
Int32 rTPos \
int Int32
Definition bzlib_private.h:44

◆ BZ_RAND_INIT_MASK

#define BZ_RAND_INIT_MASK
Value:
s->rNToGo = 0; \
s->rTPos = 0 \

◆ BZ_RAND_MASK

#define BZ_RAND_MASK   ((s->rNToGo == 1) ? 1 : 0)

◆ BZ_RAND_UPD_MASK

#define BZ_RAND_UPD_MASK
Value:
if (s->rNToGo == 0) { \
s->rNToGo = BZ2_rNums[s->rTPos]; \
s->rTPos++; \
if (s->rTPos == 512) s->rTPos = 0; \
} \
s->rNToGo--;
Int32 BZ2_rNums[512]
Definition randtable.c:26

◆ BZ_RUNA

#define BZ_RUNA   0

◆ BZ_RUNB

#define BZ_RUNB   1

◆ BZ_S_INPUT

#define BZ_S_INPUT   2

◆ BZ_S_OUTPUT

#define BZ_S_OUTPUT   1

◆ BZ_UPDATE_CRC

#define BZ_UPDATE_CRC ( crcVar,
cha )
Value:
{ \
crcVar = (crcVar << 8) ^ \
BZ2_crc32Table[(crcVar >> 24) ^ \
((UChar)cha)]; \
}
UInt32 BZ2_crc32Table[256]
Definition crctable.c:31

◆ BZ_VERSION

#define BZ_VERSION   "1.0.8, 13-Jul-2019"

◆ BZ_X_BCRC_1

#define BZ_X_BCRC_1   20

◆ BZ_X_BCRC_2

#define BZ_X_BCRC_2   21

◆ BZ_X_BCRC_3

#define BZ_X_BCRC_3   22

◆ BZ_X_BCRC_4

#define BZ_X_BCRC_4   23

◆ BZ_X_BLKHDR_1

#define BZ_X_BLKHDR_1   14

◆ BZ_X_BLKHDR_2

#define BZ_X_BLKHDR_2   15

◆ BZ_X_BLKHDR_3

#define BZ_X_BLKHDR_3   16

◆ BZ_X_BLKHDR_4

#define BZ_X_BLKHDR_4   17

◆ BZ_X_BLKHDR_5

#define BZ_X_BLKHDR_5   18

◆ BZ_X_BLKHDR_6

#define BZ_X_BLKHDR_6   19

◆ BZ_X_CCRC_1

#define BZ_X_CCRC_1   47

◆ BZ_X_CCRC_2

#define BZ_X_CCRC_2   48

◆ BZ_X_CCRC_3

#define BZ_X_CCRC_3   49

◆ BZ_X_CCRC_4

#define BZ_X_CCRC_4   50

◆ BZ_X_CODING_1

#define BZ_X_CODING_1   33

◆ BZ_X_CODING_2

#define BZ_X_CODING_2   34

◆ BZ_X_CODING_3

#define BZ_X_CODING_3   35

◆ BZ_X_ENDHDR_2

#define BZ_X_ENDHDR_2   42

◆ BZ_X_ENDHDR_3

#define BZ_X_ENDHDR_3   43

◆ BZ_X_ENDHDR_4

#define BZ_X_ENDHDR_4   44

◆ BZ_X_ENDHDR_5

#define BZ_X_ENDHDR_5   45

◆ BZ_X_ENDHDR_6

#define BZ_X_ENDHDR_6   46

◆ BZ_X_IDLE

#define BZ_X_IDLE   1

◆ BZ_X_MAGIC_1

#define BZ_X_MAGIC_1   10

◆ BZ_X_MAGIC_2

#define BZ_X_MAGIC_2   11

◆ BZ_X_MAGIC_3

#define BZ_X_MAGIC_3   12

◆ BZ_X_MAGIC_4

#define BZ_X_MAGIC_4   13

◆ BZ_X_MAPPING_1

#define BZ_X_MAPPING_1   28

◆ BZ_X_MAPPING_2

#define BZ_X_MAPPING_2   29

◆ BZ_X_MTF_1

#define BZ_X_MTF_1   36

◆ BZ_X_MTF_2

#define BZ_X_MTF_2   37

◆ BZ_X_MTF_3

#define BZ_X_MTF_3   38

◆ BZ_X_MTF_4

#define BZ_X_MTF_4   39

◆ BZ_X_MTF_5

#define BZ_X_MTF_5   40

◆ BZ_X_MTF_6

#define BZ_X_MTF_6   41

◆ BZ_X_ORIGPTR_1

#define BZ_X_ORIGPTR_1   25

◆ BZ_X_ORIGPTR_2

#define BZ_X_ORIGPTR_2   26

◆ BZ_X_ORIGPTR_3

#define BZ_X_ORIGPTR_3   27

◆ BZ_X_OUTPUT

#define BZ_X_OUTPUT   2

◆ BZ_X_RANDBIT

#define BZ_X_RANDBIT   24

◆ BZ_X_SELECTOR_1

#define BZ_X_SELECTOR_1   30

◆ BZ_X_SELECTOR_2

#define BZ_X_SELECTOR_2   31

◆ BZ_X_SELECTOR_3

#define BZ_X_SELECTOR_3   32

◆ BZALLOC

#define BZALLOC ( nnn)
Value:
(strm->bzalloc)(strm->opaque,(nnn),1)

◆ BZFREE

#define BZFREE ( ppp)
Value:
(strm->bzfree)(strm->opaque,(ppp))

◆ False

#define False   ((Bool)0)

◆ GET_LL

#define GET_LL ( i)
Value:
(((UInt32)s->ll16[i]) | (GET_LL4(i) << 16))
#define GET_LL4(i)
Definition bzlib_private.h:464
lzma_index ** i
Definition index.h:629

◆ GET_LL4

#define GET_LL4 ( i)
Value:
((((UInt32)(s->ll4[(i) >> 1])) >> (((i) << 2) & 0x4)) & 0xF)

◆ MTFA_SIZE

#define MTFA_SIZE   4096

◆ MTFL_SIZE

#define MTFL_SIZE   16

◆ SET_LL

#define SET_LL ( i,
n )
Value:
{ s->ll16[i] = (UInt16)(n & 0x0000ffff); \
SET_LL4(i, n >> 16); \
}
unsigned short UInt16
Definition bzlib_private.h:47

◆ SET_LL4

#define SET_LL4 ( i,
n )
Value:
{ if (((i) & 0x1) == 0) \
s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0xf0) | (n); else \
s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0x0f) | ((n) << 4); \
}

◆ True

#define True   ((Bool)1)

◆ VPrintf0

#define VPrintf0 ( zf)
Value:
fprintf(stderr,zf)

◆ VPrintf1

#define VPrintf1 ( zf,
za1 )
Value:
fprintf(stderr,zf,za1)

◆ VPrintf2

#define VPrintf2 ( zf,
za1,
za2 )
Value:
fprintf(stderr,zf,za1,za2)

◆ VPrintf3

#define VPrintf3 ( zf,
za1,
za2,
za3 )
Value:
fprintf(stderr,zf,za1,za2,za3)

◆ VPrintf4

#define VPrintf4 ( zf,
za1,
za2,
za3,
za4 )
Value:
fprintf(stderr,zf,za1,za2,za3,za4)

◆ VPrintf5

#define VPrintf5 ( zf,
za1,
za2,
za3,
za4,
za5 )
Value:
fprintf(stderr,zf,za1,za2,za3,za4,za5)

Function Documentation

◆ BZ2_blockSort()

void BZ2_blockSort ( EState * s)
extern

◆ BZ2_bsInitWrite()

void BZ2_bsInitWrite ( EState * s)
extern

◆ BZ2_bz__AssertH__fail()

void BZ2_bz__AssertH__fail ( int errcode)
extern

◆ BZ2_compressBlock()

void BZ2_compressBlock ( EState * s,
Bool is_last_block )
extern

◆ BZ2_decompress()

Int32 BZ2_decompress ( DState * s)
extern

◆ BZ2_hbAssignCodes()

void BZ2_hbAssignCodes ( Int32 * code,
UChar * length,
Int32 minLen,
Int32 maxLen,
Int32 alphaSize )
extern

◆ BZ2_hbCreateDecodeTables()

void BZ2_hbCreateDecodeTables ( Int32 * limit,
Int32 * base,
Int32 * perm,
UChar * length,
Int32 minLen,
Int32 maxLen,
Int32 alphaSize )
extern

◆ BZ2_hbMakeCodeLengths()

void BZ2_hbMakeCodeLengths ( UChar * len,
Int32 * freq,
Int32 alphaSize,
Int32 maxLen )
extern

◆ BZ2_indexIntoF()

Int32 BZ2_indexIntoF ( Int32 indx,
Int32 * cftab )
extern

Variable Documentation

◆ BZ2_crc32Table

UInt32 BZ2_crc32Table[256]
extern

◆ BZ2_rNums

Int32 BZ2_rNums[512]
extern