ReactOS 0.4.17-dev-769-g1500a35
cabinet.h File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winnt.h"
#include "fdi.h"
#include "fci.h"
Include dependency graph for cabinet.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Ziphuft
 
struct  ZIPstate
 
struct  QTMmodelsym
 
struct  QTMmodel
 
struct  QTMstate
 
struct  LZXstate
 
struct  lzx_bits
 
struct  cab_file
 
struct  cab_folder
 
struct  cabinet
 
struct  cds_forward
 
struct  FILELIST
 
struct  SESSION
 

Macros

#define CAB_SPLITMAX   (10)
 
#define CAB_SEARCH_SIZE   (32*1024)
 
#define CHAR_BIT   (8)
 
#define CAB_ULONG_BITS   (sizeof(cab_ULONG) * CHAR_BIT)
 
#define cfhead_Signature   (0x00)
 
#define cfhead_CabinetSize   (0x08)
 
#define cfhead_FileOffset   (0x10)
 
#define cfhead_MinorVersion   (0x18)
 
#define cfhead_MajorVersion   (0x19)
 
#define cfhead_NumFolders   (0x1A)
 
#define cfhead_NumFiles   (0x1C)
 
#define cfhead_Flags   (0x1E)
 
#define cfhead_SetID   (0x20)
 
#define cfhead_CabinetIndex   (0x22)
 
#define cfhead_SIZEOF   (0x24)
 
#define cfheadext_HeaderReserved   (0x00)
 
#define cfheadext_FolderReserved   (0x02)
 
#define cfheadext_DataReserved   (0x03)
 
#define cfheadext_SIZEOF   (0x04)
 
#define cffold_DataOffset   (0x00)
 
#define cffold_NumBlocks   (0x04)
 
#define cffold_CompType   (0x06)
 
#define cffold_SIZEOF   (0x08)
 
#define cffile_UncompressedSize   (0x00)
 
#define cffile_FolderOffset   (0x04)
 
#define cffile_FolderIndex   (0x08)
 
#define cffile_Date   (0x0A)
 
#define cffile_Time   (0x0C)
 
#define cffile_Attribs   (0x0E)
 
#define cffile_SIZEOF   (0x10)
 
#define cfdata_CheckSum   (0x00)
 
#define cfdata_CompressedSize   (0x04)
 
#define cfdata_UncompressedSize   (0x06)
 
#define cfdata_SIZEOF   (0x08)
 
#define cffoldCOMPTYPE_MASK   (0x000f)
 
#define cffoldCOMPTYPE_NONE   (0x0000)
 
#define cffoldCOMPTYPE_MSZIP   (0x0001)
 
#define cffoldCOMPTYPE_QUANTUM   (0x0002)
 
#define cffoldCOMPTYPE_LZX   (0x0003)
 
#define cfheadPREV_CABINET   (0x0001)
 
#define cfheadNEXT_CABINET   (0x0002)
 
#define cfheadRESERVE_PRESENT   (0x0004)
 
#define cffileCONTINUED_FROM_PREV   (0xFFFD)
 
#define cffileCONTINUED_TO_NEXT   (0xFFFE)
 
#define cffileCONTINUED_PREV_AND_NEXT   (0xFFFF)
 
#define cffile_A_RDONLY   (0x01)
 
#define cffile_A_HIDDEN   (0x02)
 
#define cffile_A_SYSTEM   (0x04)
 
#define cffile_A_ARCH   (0x20)
 
#define cffile_A_EXEC   (0x40)
 
#define cffile_A_NAME_IS_UTF   (0x80)
 
#define ZIPWSIZE   0x8000 /* window size */
 
#define ZIPLBITS   9 /* bits in base literal/length lookup table */
 
#define ZIPDBITS   6 /* bits in base distance lookup table */
 
#define ZIPBMAX   16 /* maximum bit length of any code */
 
#define ZIPN_MAX   288 /* maximum number of codes in any set */
 
#define LZX_MIN_MATCH   (2)
 
#define LZX_MAX_MATCH   (257)
 
#define LZX_NUM_CHARS   (256)
 
#define LZX_BLOCKTYPE_INVALID   (0) /* also blocktypes 4-7 invalid */
 
#define LZX_BLOCKTYPE_VERBATIM   (1)
 
#define LZX_BLOCKTYPE_ALIGNED   (2)
 
#define LZX_BLOCKTYPE_UNCOMPRESSED   (3)
 
#define LZX_PRETREE_NUM_ELEMENTS   (20)
 
#define LZX_ALIGNED_NUM_ELEMENTS   (8) /* aligned offset tree #elements */
 
#define LZX_NUM_PRIMARY_LENGTHS   (7) /* this one missing from spec! */
 
#define LZX_NUM_SECONDARY_LENGTHS   (249) /* length tree #elements */
 
#define LZX_PRETREE_MAXSYMBOLS   (LZX_PRETREE_NUM_ELEMENTS)
 
#define LZX_PRETREE_TABLEBITS   (6)
 
#define LZX_MAINTREE_MAXSYMBOLS   (LZX_NUM_CHARS + 50*8)
 
#define LZX_MAINTREE_TABLEBITS   (12)
 
#define LZX_LENGTH_MAXSYMBOLS   (LZX_NUM_SECONDARY_LENGTHS+1)
 
#define LZX_LENGTH_TABLEBITS   (12)
 
#define LZX_ALIGNED_MAXSYMBOLS   (LZX_ALIGNED_NUM_ELEMENTS)
 
#define LZX_ALIGNED_TABLEBITS   (7)
 
#define LZX_LENTABLE_SAFETY   (64) /* we allow length table decoding overruns */
 
#define LZX_DECLARE_TABLE(tbl)
 
#define CAB_BLOCKMAX   (32768)
 
#define CAB_INPUTMAX   (CAB_BLOCKMAX+6144)
 
#define Q_INIT_BITSTREAM   do { bitsleft = 0; bitbuf = 0; } while (0)
 
#define Q_FILL_BUFFER
 
#define Q_PEEK_BITS(n)   (bitbuf >> (CAB_ULONG_BITS - (n)))
 
#define Q_REMOVE_BITS(n)   ((bitbuf <<= (n)), (bitsleft -= (n)))
 
#define Q_READ_BITS(v, n)
 
#define Q_MENTRIES(model)   (QTM(model).entries)
 
#define Q_MSYM(model, symidx)   (QTM(model).syms[(symidx)].sym)
 
#define Q_MSYMFREQ(model, symidx)   (QTM(model).syms[(symidx)].cumfreq)
 
#define GET_SYMBOL(m, var)
 
#define INIT_BITSTREAM   do { bitsleft = 0; bitbuf = 0; } while (0)
 
#define ENSURE_BITS(n)
 
#define PEEK_BITS(n)   (bitbuf >> (CAB_ULONG_BITS - (n)))
 
#define REMOVE_BITS(n)   ((bitbuf <<= (n)), (bitsleft -= (n)))
 
#define READ_BITS(v, n)
 
#define TABLEBITS(tbl)   (LZX_##tbl##_TABLEBITS)
 
#define MAXSYMBOLS(tbl)   (LZX_##tbl##_MAXSYMBOLS)
 
#define SYMTABLE(tbl)   (LZX(tbl##_table))
 
#define LENTABLE(tbl)   (LZX(tbl##_len))
 
#define BUILD_TABLE(tbl)
 
#define READ_HUFFSYM(tbl, var)
 
#define READ_LENGTHS(tbl, first, last, fn)
 
#define THOSE_ZIP_CONSTS
 
#define EXTRACT_FILLFILELIST   0x00000001
 
#define EXTRACT_EXTRACTFILES   0x00000002
 

Typedefs

typedef unsigned char cab_UBYTE
 
typedef UINT16 cab_UWORD
 
typedef UINT32 cab_ULONG
 
typedef INT32 cab_LONG
 
typedef UINT32 cab_off_t
 
typedef struct cds_forward cab_decomp_state
 

Macro Definition Documentation

◆ BUILD_TABLE

#define BUILD_TABLE (   tbl)
Value:
MAXSYMBOLS(tbl), TABLEBITS(tbl), LENTABLE(tbl), SYMTABLE(tbl) \
)) { return DECR_ILLEGALDATA; }
#define DECR_ILLEGALDATA
Definition: mszip.h:81
#define LENTABLE(tbl)
Definition: cabinet.h:424
#define SYMTABLE(tbl)
Definition: cabinet.h:423
#define MAXSYMBOLS(tbl)
Definition: cabinet.h:422
#define TABLEBITS(tbl)
Definition: cabinet.h:421
static int make_decode_table(cab_ULONG nsyms, cab_ULONG nbits, const cab_UBYTE *length, cab_UWORD *table)
Definition: fdi.c:279

Definition at line 431 of file cabinet.h.

◆ CAB_BLOCKMAX

#define CAB_BLOCKMAX   (32768)

Definition at line 227 of file cabinet.h.

◆ CAB_INPUTMAX

#define CAB_INPUTMAX   (CAB_BLOCKMAX+6144)

Definition at line 228 of file cabinet.h.

◆ CAB_SEARCH_SIZE

#define CAB_SEARCH_SIZE   (32*1024)

Definition at line 34 of file cabinet.h.

◆ CAB_SPLITMAX

#define CAB_SPLITMAX   (10)

Definition at line 32 of file cabinet.h.

◆ CAB_ULONG_BITS

#define CAB_ULONG_BITS   (sizeof(cab_ULONG) * CHAR_BIT)

Definition at line 47 of file cabinet.h.

◆ cfdata_CheckSum

#define cfdata_CheckSum   (0x00)

Definition at line 76 of file cabinet.h.

◆ cfdata_CompressedSize

#define cfdata_CompressedSize   (0x04)

Definition at line 77 of file cabinet.h.

◆ cfdata_SIZEOF

#define cfdata_SIZEOF   (0x08)

Definition at line 79 of file cabinet.h.

◆ cfdata_UncompressedSize

#define cfdata_UncompressedSize   (0x06)

Definition at line 78 of file cabinet.h.

◆ cffile_A_ARCH

#define cffile_A_ARCH   (0x20)

Definition at line 96 of file cabinet.h.

◆ cffile_A_EXEC

#define cffile_A_EXEC   (0x40)

Definition at line 97 of file cabinet.h.

◆ cffile_A_HIDDEN

#define cffile_A_HIDDEN   (0x02)

Definition at line 94 of file cabinet.h.

◆ cffile_A_NAME_IS_UTF

#define cffile_A_NAME_IS_UTF   (0x80)

Definition at line 98 of file cabinet.h.

◆ cffile_A_RDONLY

#define cffile_A_RDONLY   (0x01)

Definition at line 93 of file cabinet.h.

◆ cffile_A_SYSTEM

#define cffile_A_SYSTEM   (0x04)

Definition at line 95 of file cabinet.h.

◆ cffile_Attribs

#define cffile_Attribs   (0x0E)

Definition at line 74 of file cabinet.h.

◆ cffile_Date

#define cffile_Date   (0x0A)

Definition at line 72 of file cabinet.h.

◆ cffile_FolderIndex

#define cffile_FolderIndex   (0x08)

Definition at line 71 of file cabinet.h.

◆ cffile_FolderOffset

#define cffile_FolderOffset   (0x04)

Definition at line 70 of file cabinet.h.

◆ cffile_SIZEOF

#define cffile_SIZEOF   (0x10)

Definition at line 75 of file cabinet.h.

◆ cffile_Time

#define cffile_Time   (0x0C)

Definition at line 73 of file cabinet.h.

◆ cffile_UncompressedSize

#define cffile_UncompressedSize   (0x00)

Definition at line 69 of file cabinet.h.

◆ cffileCONTINUED_FROM_PREV

#define cffileCONTINUED_FROM_PREV   (0xFFFD)

Definition at line 90 of file cabinet.h.

◆ cffileCONTINUED_PREV_AND_NEXT

#define cffileCONTINUED_PREV_AND_NEXT   (0xFFFF)

Definition at line 92 of file cabinet.h.

◆ cffileCONTINUED_TO_NEXT

#define cffileCONTINUED_TO_NEXT   (0xFFFE)

Definition at line 91 of file cabinet.h.

◆ cffold_CompType

#define cffold_CompType   (0x06)

Definition at line 67 of file cabinet.h.

◆ cffold_DataOffset

#define cffold_DataOffset   (0x00)

Definition at line 65 of file cabinet.h.

◆ cffold_NumBlocks

#define cffold_NumBlocks   (0x04)

Definition at line 66 of file cabinet.h.

◆ cffold_SIZEOF

#define cffold_SIZEOF   (0x08)

Definition at line 68 of file cabinet.h.

◆ cffoldCOMPTYPE_LZX

#define cffoldCOMPTYPE_LZX   (0x0003)

Definition at line 86 of file cabinet.h.

◆ cffoldCOMPTYPE_MASK

#define cffoldCOMPTYPE_MASK   (0x000f)

Definition at line 82 of file cabinet.h.

◆ cffoldCOMPTYPE_MSZIP

#define cffoldCOMPTYPE_MSZIP   (0x0001)

Definition at line 84 of file cabinet.h.

◆ cffoldCOMPTYPE_NONE

#define cffoldCOMPTYPE_NONE   (0x0000)

Definition at line 83 of file cabinet.h.

◆ cffoldCOMPTYPE_QUANTUM

#define cffoldCOMPTYPE_QUANTUM   (0x0002)

Definition at line 85 of file cabinet.h.

◆ cfhead_CabinetIndex

#define cfhead_CabinetIndex   (0x22)

Definition at line 59 of file cabinet.h.

◆ cfhead_CabinetSize

#define cfhead_CabinetSize   (0x08)

Definition at line 51 of file cabinet.h.

◆ cfhead_FileOffset

#define cfhead_FileOffset   (0x10)

Definition at line 52 of file cabinet.h.

◆ cfhead_Flags

#define cfhead_Flags   (0x1E)

Definition at line 57 of file cabinet.h.

◆ cfhead_MajorVersion

#define cfhead_MajorVersion   (0x19)

Definition at line 54 of file cabinet.h.

◆ cfhead_MinorVersion

#define cfhead_MinorVersion   (0x18)

Definition at line 53 of file cabinet.h.

◆ cfhead_NumFiles

#define cfhead_NumFiles   (0x1C)

Definition at line 56 of file cabinet.h.

◆ cfhead_NumFolders

#define cfhead_NumFolders   (0x1A)

Definition at line 55 of file cabinet.h.

◆ cfhead_SetID

#define cfhead_SetID   (0x20)

Definition at line 58 of file cabinet.h.

◆ cfhead_Signature

#define cfhead_Signature   (0x00)

Definition at line 50 of file cabinet.h.

◆ cfhead_SIZEOF

#define cfhead_SIZEOF   (0x24)

Definition at line 60 of file cabinet.h.

◆ cfheadext_DataReserved

#define cfheadext_DataReserved   (0x03)

Definition at line 63 of file cabinet.h.

◆ cfheadext_FolderReserved

#define cfheadext_FolderReserved   (0x02)

Definition at line 62 of file cabinet.h.

◆ cfheadext_HeaderReserved

#define cfheadext_HeaderReserved   (0x00)

Definition at line 61 of file cabinet.h.

◆ cfheadext_SIZEOF

#define cfheadext_SIZEOF   (0x04)

Definition at line 64 of file cabinet.h.

◆ cfheadNEXT_CABINET

#define cfheadNEXT_CABINET   (0x0002)

Definition at line 88 of file cabinet.h.

◆ cfheadPREV_CABINET

#define cfheadPREV_CABINET   (0x0001)

Definition at line 87 of file cabinet.h.

◆ cfheadRESERVE_PRESENT

#define cfheadRESERVE_PRESENT   (0x0004)

Definition at line 89 of file cabinet.h.

◆ CHAR_BIT

#define CHAR_BIT   (8)

Definition at line 45 of file cabinet.h.

◆ ENSURE_BITS

#define ENSURE_BITS (   n)
Value:
while (bitsleft < (n)) { \
bitbuf |= ((inpos[1]<<8)|inpos[0]) << (CAB_ULONG_BITS-16 - bitsleft); \
bitsleft += 16; inpos+=2; \
}
#define CAB_ULONG_BITS
Definition: cabinet.h:47
GLdouble n
Definition: glext.h:7729

Definition at line 399 of file cabinet.h.

◆ EXTRACT_EXTRACTFILES

#define EXTRACT_EXTRACTFILES   0x00000002

Definition at line 490 of file cabinet.h.

◆ EXTRACT_FILLFILELIST

#define EXTRACT_FILLFILELIST   0x00000001

Definition at line 489 of file cabinet.h.

◆ GET_SYMBOL

#define GET_SYMBOL (   m,
  var 
)
Value:
do { \
range = ((H - L) & 0xFFFF) + 1; \
symf = ((((C - L + 1) * Q_MSYMFREQ(m,0)) - 1) / range) & 0xFFFF; \
\
for (i=1; i < Q_MENTRIES(m); i++) { \
if (Q_MSYMFREQ(m,i) <= symf) break; \
} \
(var) = Q_MSYM(m,i-1); \
\
range = (H - L) + 1; \
H = L + ((Q_MSYMFREQ(m,i-1) * range) / Q_MSYMFREQ(m,0)) - 1; \
L = L + ((Q_MSYMFREQ(m,i) * range) / Q_MSYMFREQ(m,0)); \
while (1) { \
if ((L & 0x8000) != (H & 0x8000)) { \
if ((L & 0x4000) && !(H & 0x4000)) { \
/* underflow case */ \
C ^= 0x4000; L &= 0x3FFF; H |= 0x4000; \
} \
else break; \
} \
L <<= 1; H = (H << 1) | 1; \
C = (C << 1) | Q_PEEK_BITS(1); \
Q_REMOVE_BITS(1); \
} \
\
QTMupdatemodel(&(QTM(m)), i); \
} while (0)
Definition: terminate.cpp:24
#define Q_MSYMFREQ(model, symidx)
Definition: cabinet.h:344
#define Q_MSYM(model, symidx)
Definition: cabinet.h:343
#define Q_FILL_BUFFER
Definition: cabinet.h:322
#define Q_PEEK_BITS(n)
Definition: cabinet.h:329
#define Q_MENTRIES(model)
Definition: cabinet.h:342
#define QTM(x)
Definition: fdi.c:176
#define L(x)
Definition: resources.c:13
GLenum GLint * range
Definition: glext.h:7539
const GLfloat * m
Definition: glext.h:10848
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const char * var
Definition: shader.c:5666
#define H

Definition at line 349 of file cabinet.h.

◆ INIT_BITSTREAM

#define INIT_BITSTREAM   do { bitsleft = 0; bitbuf = 0; } while (0)

Definition at line 396 of file cabinet.h.

◆ LENTABLE

#define LENTABLE (   tbl)    (LZX(tbl##_len))

Definition at line 424 of file cabinet.h.

◆ LZX_ALIGNED_MAXSYMBOLS

#define LZX_ALIGNED_MAXSYMBOLS   (LZX_ALIGNED_NUM_ELEMENTS)

Definition at line 185 of file cabinet.h.

◆ LZX_ALIGNED_NUM_ELEMENTS

#define LZX_ALIGNED_NUM_ELEMENTS   (8) /* aligned offset tree #elements */

Definition at line 174 of file cabinet.h.

◆ LZX_ALIGNED_TABLEBITS

#define LZX_ALIGNED_TABLEBITS   (7)

Definition at line 186 of file cabinet.h.

◆ LZX_BLOCKTYPE_ALIGNED

#define LZX_BLOCKTYPE_ALIGNED   (2)

Definition at line 171 of file cabinet.h.

◆ LZX_BLOCKTYPE_INVALID

#define LZX_BLOCKTYPE_INVALID   (0) /* also blocktypes 4-7 invalid */

Definition at line 169 of file cabinet.h.

◆ LZX_BLOCKTYPE_UNCOMPRESSED

#define LZX_BLOCKTYPE_UNCOMPRESSED   (3)

Definition at line 172 of file cabinet.h.

◆ LZX_BLOCKTYPE_VERBATIM

#define LZX_BLOCKTYPE_VERBATIM   (1)

Definition at line 170 of file cabinet.h.

◆ LZX_DECLARE_TABLE

#define LZX_DECLARE_TABLE (   tbl)
Value:
cab_UWORD tbl##_table[(1<<LZX_##tbl##_TABLEBITS) + (LZX_##tbl##_MAXSYMBOLS<<1)];\
cab_UBYTE tbl##_len [LZX_##tbl##_MAXSYMBOLS + LZX_LENTABLE_SAFETY]
UINT16 cab_UWORD
Definition: mszip.h:26
unsigned char cab_UBYTE
Definition: mszip.h:25
#define LZX_LENTABLE_SAFETY
Definition: cabinet.h:188

Definition at line 190 of file cabinet.h.

◆ LZX_LENGTH_MAXSYMBOLS

#define LZX_LENGTH_MAXSYMBOLS   (LZX_NUM_SECONDARY_LENGTHS+1)

Definition at line 183 of file cabinet.h.

◆ LZX_LENGTH_TABLEBITS

#define LZX_LENGTH_TABLEBITS   (12)

Definition at line 184 of file cabinet.h.

◆ LZX_LENTABLE_SAFETY

#define LZX_LENTABLE_SAFETY   (64) /* we allow length table decoding overruns */

Definition at line 188 of file cabinet.h.

◆ LZX_MAINTREE_MAXSYMBOLS

#define LZX_MAINTREE_MAXSYMBOLS   (LZX_NUM_CHARS + 50*8)

Definition at line 181 of file cabinet.h.

◆ LZX_MAINTREE_TABLEBITS

#define LZX_MAINTREE_TABLEBITS   (12)

Definition at line 182 of file cabinet.h.

◆ LZX_MAX_MATCH

#define LZX_MAX_MATCH   (257)

Definition at line 167 of file cabinet.h.

◆ LZX_MIN_MATCH

#define LZX_MIN_MATCH   (2)

Definition at line 166 of file cabinet.h.

◆ LZX_NUM_CHARS

#define LZX_NUM_CHARS   (256)

Definition at line 168 of file cabinet.h.

◆ LZX_NUM_PRIMARY_LENGTHS

#define LZX_NUM_PRIMARY_LENGTHS   (7) /* this one missing from spec! */

Definition at line 175 of file cabinet.h.

◆ LZX_NUM_SECONDARY_LENGTHS

#define LZX_NUM_SECONDARY_LENGTHS   (249) /* length tree #elements */

Definition at line 176 of file cabinet.h.

◆ LZX_PRETREE_MAXSYMBOLS

#define LZX_PRETREE_MAXSYMBOLS   (LZX_PRETREE_NUM_ELEMENTS)

Definition at line 179 of file cabinet.h.

◆ LZX_PRETREE_NUM_ELEMENTS

#define LZX_PRETREE_NUM_ELEMENTS   (20)

Definition at line 173 of file cabinet.h.

◆ LZX_PRETREE_TABLEBITS

#define LZX_PRETREE_TABLEBITS   (6)

Definition at line 180 of file cabinet.h.

◆ MAXSYMBOLS

#define MAXSYMBOLS (   tbl)    (LZX_##tbl##_MAXSYMBOLS)

Definition at line 422 of file cabinet.h.

◆ PEEK_BITS

#define PEEK_BITS (   n)    (bitbuf >> (CAB_ULONG_BITS - (n)))

Definition at line 405 of file cabinet.h.

◆ Q_FILL_BUFFER

#define Q_FILL_BUFFER
Value:
do { \
if (bitsleft <= (CAB_ULONG_BITS - 16)) { \
bitbuf |= ((inpos[0]<<8)|inpos[1]) << (CAB_ULONG_BITS-16 - bitsleft); \
bitsleft += 16; inpos += 2; \
} \
} while (0)

Definition at line 322 of file cabinet.h.

◆ Q_INIT_BITSTREAM

#define Q_INIT_BITSTREAM   do { bitsleft = 0; bitbuf = 0; } while (0)

Definition at line 320 of file cabinet.h.

◆ Q_MENTRIES

#define Q_MENTRIES (   model)    (QTM(model).entries)

Definition at line 342 of file cabinet.h.

◆ Q_MSYM

#define Q_MSYM (   model,
  symidx 
)    (QTM(model).syms[(symidx)].sym)

Definition at line 343 of file cabinet.h.

◆ Q_MSYMFREQ

#define Q_MSYMFREQ (   model,
  symidx 
)    (QTM(model).syms[(symidx)].cumfreq)

Definition at line 344 of file cabinet.h.

◆ Q_PEEK_BITS

#define Q_PEEK_BITS (   n)    (bitbuf >> (CAB_ULONG_BITS - (n)))

Definition at line 329 of file cabinet.h.

◆ Q_READ_BITS

#define Q_READ_BITS (   v,
  n 
)
Value:
do { \
(v) = 0; \
for (bitsneed = (n); bitsneed; bitsneed -= bitrun) { \
bitrun = (bitsneed > bitsleft) ? bitsleft : bitsneed; \
(v) = ((v) << bitrun) | Q_PEEK_BITS(bitrun); \
Q_REMOVE_BITS(bitrun); \
} \
} while (0)
const GLdouble * v
Definition: gl.h:2040

Definition at line 332 of file cabinet.h.

◆ Q_REMOVE_BITS

#define Q_REMOVE_BITS (   n)    ((bitbuf <<= (n)), (bitsleft -= (n)))

Definition at line 330 of file cabinet.h.

◆ READ_BITS

#define READ_BITS (   v,
  n 
)
Value:
do { \
if (n) { \
ENSURE_BITS(n); \
(v) = PEEK_BITS(n); \
REMOVE_BITS(n); \
} \
else { \
(v) = 0; \
} \
} while (0)
#define PEEK_BITS(n)
Definition: cabinet.h:405

Definition at line 408 of file cabinet.h.

◆ READ_HUFFSYM

#define READ_HUFFSYM (   tbl,
  var 
)
Value:
do { \
ENSURE_BITS(16); \
hufftbl = SYMTABLE(tbl); \
if ((i = hufftbl[PEEK_BITS(TABLEBITS(tbl))]) >= MAXSYMBOLS(tbl)) { \
j = 1 << (CAB_ULONG_BITS - TABLEBITS(tbl)); \
do { \
j >>= 1; i <<= 1; i |= (bitbuf & j) ? 1 : 0; \
if (!j) { return DECR_ILLEGALDATA; } \
} while ((i = hufftbl[i]) >= MAXSYMBOLS(tbl)); \
} \
j = LENTABLE(tbl)[(var) = i]; \
REMOVE_BITS(j); \
} while (0)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250

Definition at line 439 of file cabinet.h.

◆ READ_LENGTHS

#define READ_LENGTHS (   tbl,
  first,
  last,
  fn 
)
Value:
do { \
lb.bb = bitbuf; lb.bl = bitsleft; lb.ip = inpos; \
if (fn(LENTABLE(tbl),(first),(last),&lb,decomp_state)) { \
return DECR_ILLEGALDATA; \
} \
bitbuf = lb.bb; bitsleft = lb.bl; inpos = lb.ip; \
} while (0)
const GLint * first
Definition: glext.h:5794
static const LARGE_INTEGER *static const HANDLE const LARGE_INTEGER *static PSLIST_ENTRY PSLIST_ENTRY last
Definition: sync.c:64
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159

Definition at line 457 of file cabinet.h.

◆ REMOVE_BITS

#define REMOVE_BITS (   n)    ((bitbuf <<= (n)), (bitsleft -= (n)))

Definition at line 406 of file cabinet.h.

◆ SYMTABLE

#define SYMTABLE (   tbl)    (LZX(tbl##_table))

Definition at line 423 of file cabinet.h.

◆ TABLEBITS

#define TABLEBITS (   tbl)    (LZX_##tbl##_TABLEBITS)

Definition at line 421 of file cabinet.h.

◆ THOSE_ZIP_CONSTS

#define THOSE_ZIP_CONSTS
Value:
static const cab_UBYTE Zipborder[] = /* Order of the bit length code lengths */ \
{ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; \
static const cab_UWORD Zipcplens[] = /* Copy lengths for literal codes 257..285 */ \
{ 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}; \
static const cab_UWORD Zipcplext[] = /* Extra bits for literal codes 257..285 */ \
{ 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}; /* 99==invalid */ \
static const cab_UWORD Zipcpdist[] = /* Copy offsets for distance codes 0..29 */ \
{ 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}; \
static const cab_UWORD Zipcpdext[] = /* Extra bits for distance codes */ \
{ 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}; \
/* And'ing with Zipmask[n] masks the lower n bits */ \
static const cab_UWORD Zipmask[17] = { \
0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, \
0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff \
}

Definition at line 467 of file cabinet.h.

◆ ZIPBMAX

#define ZIPBMAX   16 /* maximum bit length of any code */

Definition at line 107 of file cabinet.h.

◆ ZIPDBITS

#define ZIPDBITS   6 /* bits in base distance lookup table */

Definition at line 106 of file cabinet.h.

◆ ZIPLBITS

#define ZIPLBITS   9 /* bits in base literal/length lookup table */

Definition at line 105 of file cabinet.h.

◆ ZIPN_MAX

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

Definition at line 108 of file cabinet.h.

◆ ZIPWSIZE

#define ZIPWSIZE   0x8000 /* window size */

Definition at line 104 of file cabinet.h.

Typedef Documentation

◆ cab_decomp_state

◆ cab_LONG

typedef INT32 cab_LONG

Definition at line 39 of file cabinet.h.

◆ cab_off_t

typedef UINT32 cab_off_t

Definition at line 41 of file cabinet.h.

◆ cab_UBYTE

Definition at line 36 of file cabinet.h.

◆ cab_ULONG

typedef UINT32 cab_ULONG

Definition at line 38 of file cabinet.h.

◆ cab_UWORD

typedef UINT16 cab_UWORD

Definition at line 37 of file cabinet.h.