Method | Description | |
---|---|---|
CompressWithLA ( Stream instream, long inLength, Stream outstream ) : int |
Variation of the original compression method, making use of Dynamic Programming to 'look ahead' and determine the optimal 'length' values for the compressed blocks. Is not 100% optimal, as the flag-bytes are not taken into account.
|
|
Decompress ( Stream instream, Stream outstream ) : long |
Method | Description | |
---|---|---|
GetOccurrenceLength ( byte newPtr, int newLength, byte oldPtr, int oldLength, int &disp ) : int |
Determine the maximum size of a LZ-compressed block starting at newPtr, using the already compressed data starting at oldPtr. Takes O(inLength * oldLength) = O(n^2) time.
|
|
GetOptimalCompressionLengths ( byte indata, int inLength, int &lengths, int &disps ) : void |
Gets the optimal compression lengths for each start of a compressed block using Dynamic Programming. This takes O(n^2) time, although in practice it will often be O(n^3) since one of the constants is 0x10110 (the maximum length of a compressed block)
|
public static CompressWithLA ( Stream instream, long inLength, Stream outstream ) : int | ||
instream | Stream | |
inLength | long | |
outstream | Stream | |
return | int |
public static Decompress ( Stream instream, Stream outstream ) : long | ||
instream | Stream | |
outstream | Stream | |
return | long |