Fingerprint_Card

Loading...
Searching...
No Matches
ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman Class Reference

This is the DeflaterHuffman class. More...

Collaboration diagram for ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman:
[legend]

## Classes
class | Tree

## Public Member Functions
| DeflaterHuffman (DeflaterPending pending)
| Construct instance with pending buffer.
void | Reset ()
| Reset internal state.
void | SendAllTrees (int blTreeCodes)
| Write all trees to pending buffer.
void | CompressBlock ()
| Compress current buffer writing data to pending buffer.
void | FlushStoredBlock (byte[] stored, int storedOffset, int storedLength, bool lastBlock)
| Flush block to output with no compression.
void | FlushBlock (byte[] stored, int storedOffset, int storedLength, bool lastBlock)
| Flush block to output with compression.
bool | IsFull ()
| Get value indicating if internal buffer is full.
bool | TallyLit (int literal)
| Add literal to buffer.
bool | TallyDist (int distance, int length)
| Add distance code and length to literal and distance trees.

## Static Public Member Functions
static short | BitReverse (int toReverse)
| Reverse the bits of a 16 bit value.

## Public Attributes
DeflaterPending | pending
| Pending buffer to use.

## Static Private Member Functions
static | DeflaterHuffman ()
static int | Lcode (int length)
static int | Dcode (int distance)

## Private Attributes
Tree | literalTree
Tree | distTree
Tree | blTree
short[] | d_buf
byte[] | l_buf
int | last_lit
int | extra_bits

## Static Private Attributes
const int | BUFSIZE = 1 << (DeflaterConstants.DEFAULT_MEM_LEVEL + 6)
const int | LITERAL_NUM = 286
const int | DIST_NUM = 30
const int | BITLEN_NUM = 19
const int | REP_3_6 = 16
const int | REP_3_10 = 17
const int | REP_11_138 = 18
const int | EOF_SYMBOL = 256
static readonly int[] | BL_ORDER = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }
static readonly byte[] | bit4Reverse
static short[] | staticLCodes
static byte[] | staticLLength
static short[] | staticDCodes
static byte[] | staticDLength

## Detailed Description

This is the DeflaterHuffman class.

This class is not thread safe. This is inherent in the API, due to the split of Deflate and SetInput.

author of the original java version : Jochen Hoenicke

## Constructor & Destructor Documentation

## ◆ DeflaterHuffman() [1/2]

ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.DeflaterHuffman | ( |  | ) |
| static private

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ DeflaterHuffman() [2/2]

ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.DeflaterHuffman | ( | DeflaterPending | pending | ) |

Construct instance with pending buffer.

Parameters

  pending | Pending buffer to use

## Member Function Documentation

## ◆ BitReverse()

short ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.BitReverse | ( | int | toReverse | ) |
| static

Reverse the bits of a 16 bit value.

Parameters

  toReverse | Value to reverse bits

Returns
  Value with bits reversed

Here is the caller graph for this function:

## ◆ CompressBlock()

void ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.CompressBlock | ( |  | ) |

Compress current buffer writing data to pending buffer.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ Dcode()

int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.Dcode | ( | int | distance | ) |
| static private

Here is the caller graph for this function:

## ◆ FlushBlock()

void ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.FlushBlock | ( | byte[] | stored,
|  | int | storedOffset,
|  | int | storedLength,
|  | bool | lastBlock )

Flush block to output with compression.

Parameters

  stored | Data to flush
  storedOffset | Index of first byte to flush
  storedLength | Count of bytes to flush
  lastBlock | True if this is the last block

Here is the call graph for this function:

## ◆ FlushStoredBlock()

void ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.FlushStoredBlock | ( | byte[] | stored,
|  | int | storedOffset,
|  | int | storedLength,
|  | bool | lastBlock )

Flush block to output with no compression.

Parameters

  stored | Data to write
  storedOffset | Index of first byte to write
  storedLength | Count of bytes to write
  lastBlock | True if this is the last block

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ IsFull()

bool ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.IsFull | ( |  | ) |

Get value indicating if internal buffer is full.

Returns
  true if buffer is full

Here is the caller graph for this function:

## ◆ Lcode()

int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.Lcode | ( | int | length | ) |
| static private

Here is the caller graph for this function:

## ◆ Reset()

void ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.Reset | ( |  | ) |

Reset internal state.

Here is the caller graph for this function:

## ◆ SendAllTrees()

void ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.SendAllTrees | ( | int | blTreeCodes | ) |

Write all trees to pending buffer.

Parameters

  blTreeCodes | The number/rank of treecodes to send.

Here is the caller graph for this function:

## ◆ TallyDist()

bool ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.TallyDist | ( | int | distance,
|  | int | length )

Add distance code and length to literal and distance trees.

Parameters

  distance | Distance code
  length | Length

Returns
  Value indicating if internal buffer is full

Here is the call graph for this function:

## ◆ TallyLit()

bool ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.TallyLit | ( | int | literal | ) |

Add literal to buffer.

Parameters

  literal | Literal value to add to buffer.

Returns
  Value indicating internal buffer is full

Here is the call graph for this function:

## Member Data Documentation

## ◆ bit4Reverse

readonly byte [] ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.bit4Reverse
| static private

Initial value:
= {
0,
8,
4,
12,
2,
10,
6,
14,
1,
9,
5,
13,
3,
11,
7,
15
}

## ◆ BITLEN_NUM

const int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.BITLEN_NUM = 19
| static private

## ◆ BL_ORDER

readonly int [] ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.BL_ORDER = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }
| static private

## ◆ blTree

Tree ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.blTree
| private

## ◆ BUFSIZE

const int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.BUFSIZE = 1 << (DeflaterConstants.DEFAULT_MEM_LEVEL + 6)
| static private

## ◆ d_buf

short [] ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.d_buf
| private

## ◆ DIST_NUM

const int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.DIST_NUM = 30
| static private

## ◆ distTree

Tree ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.distTree
| private

## ◆ EOF_SYMBOL

const int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.EOF_SYMBOL = 256
| static private

## ◆ extra_bits

int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.extra_bits
| private

## ◆ l_buf

byte [] ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.l_buf
| private

## ◆ last_lit

int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.last_lit
| private

## ◆ LITERAL_NUM

const int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.LITERAL_NUM = 286
| static private

## ◆ literalTree

Tree ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.literalTree
| private

## ◆ pending

DeflaterPending ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.pending

Pending buffer to use.

## ◆ REP_11_138

const int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.REP_11_138 = 18
| static private

## ◆ REP_3_10

const int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.REP_3_10 = 17
| static private

## ◆ REP_3_6

const int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.REP_3_6 = 16
| static private

## ◆ staticDCodes

short [] ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.staticDCodes
| static private

## ◆ staticDLength

byte [] ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.staticDLength
| static private

## ◆ staticLCodes

short [] ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.staticLCodes
| static private

## ◆ staticLLength

byte [] ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.staticLLength
| static private

The documentation for this class was generated from the following file:

- ICSharpCode.SharpZLib/Zip/Compression/DeflaterHuffman.cs