This is the DeflaterHuffman class.
More...
|
| | 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 short | BitReverse (int toReverse) |
| | Reverse the bits of a 16 bit value.
|
|
| 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 |
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
◆ DeflaterHuffman() [1/2]
| ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.DeflaterHuffman |
( |
| ) |
|
|
staticprivate |
◆ DeflaterHuffman() [2/2]
| ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.DeflaterHuffman |
( |
DeflaterPending | pending | ) |
|
Construct instance with pending buffer.
- Parameters
-
| pending | Pending buffer to use |
◆ 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
◆ CompressBlock()
| void ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.CompressBlock |
( |
| ) |
|
Compress current buffer writing data to pending buffer.
◆ Dcode()
| int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.Dcode |
( |
int | distance | ) |
|
|
staticprivate |
◆ 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 |
◆ 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 |
◆ IsFull()
| bool ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.IsFull |
( |
| ) |
|
Get value indicating if internal buffer is full.
- Returns
- true if buffer is full
◆ Lcode()
| int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.Lcode |
( |
int | length | ) |
|
|
staticprivate |
◆ Reset()
| void ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.Reset |
( |
| ) |
|
◆ 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. |
◆ 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
◆ 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
◆ bit4Reverse
| readonly byte [] ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.bit4Reverse |
|
staticprivate |
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 |
|
staticprivate |
◆ 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 } |
|
staticprivate |
◆ blTree
| Tree ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.blTree |
|
private |
◆ BUFSIZE
◆ d_buf
| short [] ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.d_buf |
|
private |
◆ DIST_NUM
| const int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.DIST_NUM = 30 |
|
staticprivate |
◆ distTree
| Tree ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.distTree |
|
private |
◆ EOF_SYMBOL
| const int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.EOF_SYMBOL = 256 |
|
staticprivate |
◆ 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 |
|
staticprivate |
◆ literalTree
| Tree ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.literalTree |
|
private |
◆ pending
| DeflaterPending ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.pending |
◆ REP_11_138
| const int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.REP_11_138 = 18 |
|
staticprivate |
◆ REP_3_10
| const int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.REP_3_10 = 17 |
|
staticprivate |
◆ REP_3_6
| const int ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.REP_3_6 = 16 |
|
staticprivate |
◆ staticDCodes
| short [] ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.staticDCodes |
|
staticprivate |
◆ staticDLength
| byte [] ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.staticDLength |
|
staticprivate |
◆ staticLCodes
| short [] ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.staticLCodes |
|
staticprivate |
◆ staticLLength
| byte [] ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.staticLLength |
|
staticprivate |
The documentation for this class was generated from the following file: