Beispiel #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();
 }
Beispiel #2
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());
        }
Beispiel #3
0
        public static int MaxCompressedLength(int sourceLength)
        {
            var compressor = new SnappyCompressor();

            return(compressor.MaxCompressedLength(sourceLength));
        }
Beispiel #4
0
 public static int MaxCompressedLength(int sourceLength)
 {
     var compressor = new SnappyCompressor();
     return compressor.MaxCompressedLength(sourceLength);
 }
Beispiel #5
0
 public static int MaxCompressedLength(int sourceLength)
 {
     return(compressor.MaxCompressedLength(sourceLength));
 }