CreateNew() public static method

public static CreateNew ( ) : ILZ4Compressor
return ILZ4Compressor
Exemplo n.º 1
0
 /// <summary>
 /// Compress source into dest returning compressed length
 /// </summary>
 /// <param name="source">uncompressed data</param>
 /// <param name="srcOffset">offset in source array where reading will start</param>
 /// <param name="count">count of bytes in source array to compress</param>
 /// <param name="dest">array into which source will be compressed</param>
 /// <param name="dstOffset">start index in dest array where writing will start</param>
 /// <returns>compressed length</returns>
 public static int Compress(byte[] source, int srcOffset, int count, byte[] dest, int dstOffset)
 {
     return(LZ4CompressorFactory.CreateNew().Compress(source, srcOffset, count, dest, dstOffset));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Calculate the max compressed byte[] size given the size of the uncompressed byte[]
 /// </summary>
 /// <param name="uncompressedLength">Length of the uncompressed data</param>
 /// <returns>The maximum required size in bytes of the compressed data</returns>
 public static int CalculateMaxCompressedLength(int uncompressedLength)
 {
     return(LZ4CompressorFactory.CreateNew().CalculateMaxCompressedLength(uncompressedLength));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Compress source into dest returning compressed length
 /// </summary>
 /// <param name="source">uncompressed data</param>
 /// <param name="dest">array into which source will be compressed</param>
 /// <returns>compressed length</returns>
 public static int Compress(byte[] source, byte[] dest)
 {
     return(LZ4CompressorFactory.CreateNew().Compress(source, dest));
 }
Exemplo n.º 4
0
 public static byte[] Compress(byte[] source)
 {
     return(LZ4CompressorFactory.CreateNew().Compress(source));
 }