Example #1
0
 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();
 }
Example #2
0
        public static byte[] Compress(byte[] uncompressed)
        {
            var result = new byte[compressor.MaxCompressedLength(uncompressed.Length)];
            var count  = compressor.Compress(uncompressed, 0, uncompressed.Length, result);

            return(result.Take(count).ToArray());
        }
Example #3
0
        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());
        }