public byte[] Compress(byte[] src, out int dest_size) { int len = src.Length; byte[] dest = new byte[len * 2]; NativeEncryption.Compress(dest, src, out dest_size, ref len); return(dest); }
public byte[] Compress(byte[] src, int len, out int dest_size) { if (src.Length < len) { throw new ArgumentOutOfRangeException("len", "Requested data lenght is larger than specified buffer."); } byte[] dest = new byte[len * 2]; NativeEncryption.Compress(dest, src, out dest_size, ref len); return(dest); }