C# Class Nintenlord.Compressor.Compressions.LZ77

Inheritance: Compression
Show file Open project: Diegoisawesome/AwesomeMapEditor-old

Public Methods

Method Description
CanBeDecompressed ( byte data ) : bool

Checks if data can be uncompressed

CanBeDecompressed ( byte data, int offset ) : bool

Checks if data can be uncompressed

CanBeDecompressed ( byte source, int minSize, int maxSize ) : bool

Checks if data can be uncompressed

CanBeDecompressed ( byte data, int offset, int maxLength, int minLength ) : bool

Checks if data can be uncompressed

Compress ( byte data ) : byte[]

Compresses data with LZ77

Compress ( byte data, int offset ) : byte[]

Compresses data with LZ77

Compress ( byte data, int offset, int length ) : byte[]

Compresses data with LZ77

CompressedLength ( byte data ) : int

Gets the lenght of the compressed data

CompressedLength ( byte data, int offset ) : int

Gets the lenght of the compressed data

Decompress ( byte source, byte target ) : bool

Decompresses LZ77 data

Decompress ( byte data ) : byte[]

Decompresses LZ77 data

Decompress ( byte data, int offset ) : byte[]

Decompresses LZ77 data

DecompressedDataLenght ( byte data ) : int
DecompressedDataLenght ( byte data, int offset ) : int
GetCompressedDataLenght ( byte source ) : int

Gets the lenght of the compressed data

LZ77 ( ) : System
Scan ( byte data, int sizeMax, int sizeMin, int sizeModulus ) : int[]

Scans the data for potential LZ77 compressions

Scan ( byte data, int offset, int sizeMax, int sizeMin, int sizeModulus ) : int[]

Scans the data for potential LZ77 compressions

Scan ( byte data, int offset, int length, int sizeMax, int sizeMin, int sizeModulus ) : int[]

Scans the data for potential LZ77 compressions

Method Details

CanBeDecompressed() public method

Checks if data can be uncompressed
public CanBeDecompressed ( byte data ) : bool
data byte Data with data to test
return bool

CanBeDecompressed() public method

Checks if data can be uncompressed
public CanBeDecompressed ( byte data, int offset ) : bool
data byte Data with data to test
offset int Offset of the data to test in data
return bool

CanBeDecompressed() public static method

Checks if data can be uncompressed
public static CanBeDecompressed ( byte source, int minSize, int maxSize ) : bool
source byte Pointer to beginning of data
minSize int
maxSize int
return bool

CanBeDecompressed() public method

Checks if data can be uncompressed
public CanBeDecompressed ( byte data, int offset, int maxLength, int minLength ) : bool
data byte Data with data to test
offset int Offset of the data to test in data
maxLength int Maximun length the compressed data can have
minLength int Minimun length the compressed data can have
return bool

Compress() public method

Compresses data with LZ77
public Compress ( byte data ) : byte[]
data byte Data to compress
return byte[]

Compress() public method

Compresses data with LZ77
public Compress ( byte data, int offset ) : byte[]
data byte Data to compress
offset int
return byte[]

Compress() public method

Compresses data with LZ77
public Compress ( byte data, int offset, int length ) : byte[]
data byte Data to compress
offset int
length int Length of the data to compress
return byte[]

CompressedLength() public method

Gets the lenght of the compressed data
public CompressedLength ( byte data ) : int
data byte Data where compressed data is
return int

CompressedLength() public method

Gets the lenght of the compressed data
public CompressedLength ( byte data, int offset ) : int
data byte Data where compressed data is
offset int The position of the data
return int

Decompress() public method

Decompresses LZ77 data
public Decompress ( byte source, byte target ) : bool
source byte Pointer to compressed data
target byte Pointer to where uncompressed data goes
return bool

Decompress() public method

Decompresses LZ77 data
public Decompress ( byte data ) : byte[]
data byte Data where compressed data is
return byte[]

Decompress() public method

Decompresses LZ77 data
public Decompress ( byte data, int offset ) : byte[]
data byte Data where compressed data is
offset int Offset of the compressed data
return byte[]

DecompressedDataLenght() public method

public DecompressedDataLenght ( byte data ) : int
data byte
return int

DecompressedDataLenght() public method

public DecompressedDataLenght ( byte data, int offset ) : int
data byte
offset int
return int

GetCompressedDataLenght() public static method

Gets the lenght of the compressed data
public static GetCompressedDataLenght ( byte source ) : int
source byte Pointer to the data to check
return int

LZ77() public method

public LZ77 ( ) : System
return System

Scan() public method

Scans the data for potential LZ77 compressions
public Scan ( byte data, int sizeMax, int sizeMin, int sizeModulus ) : int[]
data byte Data to scan
sizeMax int Maximun size of uncompressed data allowed
sizeMin int Minimun size of uncompressed data allowed
sizeModulus int Modulus for size of uncompressed data
return int[]

Scan() public method

Scans the data for potential LZ77 compressions
public Scan ( byte data, int offset, int sizeMax, int sizeMin, int sizeModulus ) : int[]
data byte Data to scan
offset int Starting offset of are to scan
sizeMax int Maximun size of uncompressed data allowed
sizeMin int Minimun size of uncompressed data allowed
sizeModulus int Modulus for size of uncompressed data
return int[]

Scan() public method

Scans the data for potential LZ77 compressions
public Scan ( byte data, int offset, int length, int sizeMax, int sizeMin, int sizeModulus ) : int[]
data byte Data to scan
offset int Starting offset of are to scan
length int Size of the area to scan
sizeMax int Maximun size of uncompressed data allowed
sizeMin int Minimun size of uncompressed data allowed
sizeModulus int Modulus for size of uncompressed data
return int[]