Method | Description | |
---|---|---|
Compress ( byte rawdata ) : byte[] |
The public interface of the compression algorithm.
|
|
CompressFactory ( ) : System |
Constructor, with some initialization.
|
|
CompressFactory ( int historyLen, int maxLen ) : System |
Constructor, with some initialization.
|
|
Decompress ( byte data, byte header ) : byte[] |
The public interface of the decompression algorithm.
|
Method | Description | |
---|---|---|
ConvertToByte ( |
Convert an BitArray of length 8 to a byte.
|
|
EncodeReferenceInt ( int value, int width ) : IList |
||
EncodeReferenceLength ( int length ) : IList |
||
addByte ( byte b ) : void |
Add a byte (a literal) to the result bit buffer.
|
|
addCompressBytes ( int distance, int length ) : void |
Add the a match to the result bit buffer.
|
|
convertByteToBits ( byte b ) : List |
Convert a byte to an bit list of length 8.
|
|
convertIntToBits ( int val, int len ) : List |
Convert an integer to bit list.
|
|
convertStringToBits ( string s ) : List |
Convert a string to bit list.
|
|
doCompress ( ) : void |
The main procedure to do compress.
|
|
doDecompress ( ) : void |
The main procedure to do decompress.
|
|
getBits ( |
Return the value of the next "bitCount" bits as unsigned.
|
|
getCompressedResult ( ) : void |
Get the final byte array from the bit buffer.
|
|
getRecoveryResult ( ) : byte[] |
Get the result byte array from the result byte buffer(a list).
|
|
littleToBig ( byte b ) : byte |
Reverse the bit sequence in a byte.
|
|
outputLiteral ( byte c ) : void |
Add a byte to the decompression result buffer.
|
|
outputMatch ( |
Add bytes to the decompression result according to the match distance and length.
|
|
outputUncoded ( |
Add bytes to the decompression result as a result of the uncoded token.
|
public Compress ( byte rawdata ) : byte[] | ||
rawdata | byte | The source byte array to compress. |
return | byte[] |
public CompressFactory ( int historyLen, int maxLen ) : System | ||
historyLen | int | Maximum match distance / minimum history size |
maxLen | int | § Maximum number of uncompressed bytes in a single segment |
return | System |
public Decompress ( byte data, byte header ) : byte[] | ||
data | byte | The source byte array to decompress. |
header | byte | The header of the bulk data |
return | byte[] |