public static byte[] Compress(byte[] uncompressed) { var target = new SnappyCompressor(); var result = new byte[target.MaxCompressedLength(uncompressed.Length)]; var count = target.Compress(uncompressed, 0, uncompressed.Length, result); return result.Take(count).ToArray(); }
public static byte[] Compress(byte[] uncompressed) { var target = new SnappyCompressor(); var result = new byte[target.MaxCompressedLength(uncompressed.Length)]; var count = target.Compress(uncompressed, 0, uncompressed.Length, result); return(result.Take(count).ToArray()); }
public static int MaxCompressedLength(int sourceLength) { var compressor = new SnappyCompressor(); return(compressor.MaxCompressedLength(sourceLength)); }
public static int MaxCompressedLength(int sourceLength) { var compressor = new SnappyCompressor(); return compressor.MaxCompressedLength(sourceLength); }
public static int MaxCompressedLength(int sourceLength) { return(compressor.MaxCompressedLength(sourceLength)); }