C# Class LZ4Sharp.LZ4

Static LZ4 Compression and Decompression. This is threadsafe because it creates new instances of the compression/decompression classes for each method call. It is recommended to use LZ4Compressor and LZ4Decompressor for repeated compressing/decompressing for speed and less memory allocations.
Afficher le fichier Open project: stangelandcl/LZ4Sharp

Méthodes publiques

Méthode Description
CalculateMaxCompressedLength ( int uncompressedLength ) : int

Calculate the max compressed byte[] size given the size of the uncompressed byte[]

Compress ( byte source ) : byte[]
Compress ( byte source, byte dest ) : int

Compress source into dest returning compressed length

Compress ( byte source, int srcOffset, int count, byte dest, int dstOffset ) : int

Compress source into dest returning compressed length

Decompress ( byte compressed ) : byte[]
Decompress ( byte compressed, byte decompressedBuffer ) : int
Decompress ( byte compressedBuffer, byte decompressedBuffer, int compressedSize ) : int
Decompress ( byte compressedBuffer, byte decompressedBuffer, int compressedSize, int maxDecompressedSize ) : int
DecompressKnownSize ( byte compressed, byte decompressedBuffer, int decompressedSize ) : int
DecompressKnownSize ( byte compressed, byte decompressed ) : void

Method Details

CalculateMaxCompressedLength() public static méthode

Calculate the max compressed byte[] size given the size of the uncompressed byte[]
public static CalculateMaxCompressedLength ( int uncompressedLength ) : int
uncompressedLength int Length of the uncompressed data
Résultat int

Compress() public static méthode

public static Compress ( byte source ) : byte[]
source byte
Résultat byte[]

Compress() public static méthode

Compress source into dest returning compressed length
public static Compress ( byte source, byte dest ) : int
source byte uncompressed data
dest byte array into which source will be compressed
Résultat int

Compress() public static méthode

Compress source into dest returning compressed length
public static Compress ( byte source, int srcOffset, int count, byte dest, int dstOffset ) : int
source byte uncompressed data
srcOffset int offset in source array where reading will start
count int count of bytes in source array to compress
dest byte array into which source will be compressed
dstOffset int start index in dest array where writing will start
Résultat int

Decompress() public static méthode

public static Decompress ( byte compressed ) : byte[]
compressed byte
Résultat byte[]

Decompress() public static méthode

public static Decompress ( byte compressed, byte decompressedBuffer ) : int
compressed byte
decompressedBuffer byte
Résultat int

Decompress() public static méthode

public static Decompress ( byte compressedBuffer, byte decompressedBuffer, int compressedSize ) : int
compressedBuffer byte
decompressedBuffer byte
compressedSize int
Résultat int

Decompress() public static méthode

public static Decompress ( byte compressedBuffer, byte decompressedBuffer, int compressedSize, int maxDecompressedSize ) : int
compressedBuffer byte
decompressedBuffer byte
compressedSize int
maxDecompressedSize int
Résultat int

DecompressKnownSize() public static méthode

public static DecompressKnownSize ( byte compressed, byte decompressedBuffer, int decompressedSize ) : int
compressed byte
decompressedBuffer byte
decompressedSize int
Résultat int

DecompressKnownSize() public static méthode

public static DecompressKnownSize ( byte compressed, byte decompressed ) : void
compressed byte
decompressed byte
Résultat void