C# 클래스 DSDecmp.Formats.Nitro.LZ11

Compressor and decompressor for the LZ-0x11 format used in many of the games for the newer Nintendo consoles and handhelds.
파일 보기 프로젝트 열기: Diegoisawesome/AwesomeMapEditor-old 1 사용 예제들

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
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)

메소드 상세

CompressWithLA() 공개 정적인 메소드

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.
public static CompressWithLA ( Stream instream, long inLength, Stream outstream ) : int
instream Stream
inLength long
outstream Stream
리턴 int

Decompress() 공개 정적인 메소드

public static Decompress ( Stream instream, Stream outstream ) : long
instream Stream
outstream Stream
리턴 long