C# Class GARCTool.LZUtil

Class for I/O-related utility methods.
Mostrar archivo Open project: kwsch/GARCTool

Public Methods

Method Description
GetOccurrenceLength ( byte newPtr, int newLength, byte oldPtr, int oldLength, int &disp, int minDisp = 1 ) : 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.

Method Details

GetOccurrenceLength() public static method

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.
public static GetOccurrenceLength ( byte newPtr, int newLength, byte oldPtr, int oldLength, int &disp, int minDisp = 1 ) : int
newPtr byte The start of the data that needs to be compressed.
newLength int The number of bytes that still need to be compressed. /// (or: the maximum number of bytes that _may_ be compressed into one block)
oldPtr byte The start of the raw file.
oldLength int The number of bytes already compressed.
disp int The offset of the start of the longest block to refer to.
minDisp int The minimum allowed value for 'disp'.
return int