Defines | Functions
huffman.c File Reference
#include "bzlib_private.h"
Include dependency graph for huffman.c:

Go to the source code of this file.

Defines

#define ADDWEIGHTS(zw1, zw2)
#define DEPTHOF(zz1)   ((zz1) & 0x000000ff)
#define DOWNHEAP(z)
#define MYMAX(zz2, zz3)   ((zz2) > (zz3) ? (zz2) : (zz3))
#define UPHEAP(z)
#define WEIGHTOF(zz0)   ((zz0) & 0xffffff00)

Functions

void BZ2_hbAssignCodes (Int32 *code, UChar *length, Int32 minLen, Int32 maxLen, Int32 alphaSize)
void BZ2_hbCreateDecodeTables (Int32 *limit, Int32 *base, Int32 *perm, UChar *length, Int32 minLen, Int32 maxLen, Int32 alphaSize)
void BZ2_hbMakeCodeLengths (UChar *len, Int32 *freq, Int32 alphaSize, Int32 maxLen)

Define Documentation

#define ADDWEIGHTS (   zw1,
  zw2 
)
Value:
(WEIGHTOF(zw1)+WEIGHTOF(zw2)) |                    \
   (1 + MYMAX(DEPTHOF(zw1),DEPTHOF(zw2)))

Definition at line 29 of file huffman.c.

#define DEPTHOF (   zz1)    ((zz1) & 0x000000ff)

Definition at line 26 of file huffman.c.

#define DOWNHEAP (   z)
Value:
{                                                     \
   Int32 zz, yy, tmp;                                 \
   zz = z; tmp = heap[zz];                            \
   while (True) {                                     \
      yy = zz << 1;                                   \
      if (yy > nHeap) break;                          \
      if (yy < nHeap &&                               \
          weight[heap[yy+1]] < weight[heap[yy]])      \
         yy++;                                        \
      if (weight[tmp] < weight[heap[yy]]) break;      \
      heap[zz] = heap[yy];                            \
      zz = yy;                                        \
   }                                                  \
   heap[zz] = tmp;                                    \
}

Definition at line 44 of file huffman.c.

#define MYMAX (   zz2,
  zz3 
)    ((zz2) > (zz3) ? (zz2) : (zz3))

Definition at line 27 of file huffman.c.

#define UPHEAP (   z)
Value:
{                                                     \
   Int32 zz, tmp;                                     \
   zz = z; tmp = heap[zz];                            \
   while (weight[tmp] < weight[heap[zz >> 1]]) {      \
      heap[zz] = heap[zz >> 1];                       \
      zz >>= 1;                                       \
   }                                                  \
   heap[zz] = tmp;                                    \
}

Definition at line 33 of file huffman.c.

#define WEIGHTOF (   zz0)    ((zz0) & 0xffffff00)

Definition at line 25 of file huffman.c.


Function Documentation

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

Definition at line 152 of file huffman.c.

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

Definition at line 170 of file huffman.c.

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

Definition at line 63 of file huffman.c.



win_bzip2
Author(s): Daniel Stonier
autogenerated on Wed Sep 16 2015 07:14:10