コード例 #1
0
ファイル: Snappy.cs プロジェクト: cicorias/Snappy.Sharp
 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();
 }
コード例 #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());
        }
コード例 #3
0
        public static int MaxCompressedLength(int sourceLength)
        {
            var compressor = new SnappyCompressor();

            return(compressor.MaxCompressedLength(sourceLength));
        }
コード例 #4
0
ファイル: Snappy.cs プロジェクト: cicorias/Snappy.Sharp
 public static int MaxCompressedLength(int sourceLength)
 {
     var compressor = new SnappyCompressor();
     return compressor.MaxCompressedLength(sourceLength);
 }
コード例 #5
0
 public static int MaxCompressedLength(int sourceLength)
 {
     return(compressor.MaxCompressedLength(sourceLength));
 }