BinaryRage.Functions.Compress.CompressGZip C# (CSharp) Method

CompressGZip() public static method

public static CompressGZip ( byte raw ) : byte[]
raw byte
return byte[]
        public static byte[] CompressGZip(byte[] raw)
        {
            using (MemoryStream memory = new MemoryStream())
            {
                using (GZipStream gzip = new GZipStream(memory, CompressionMode.Compress, false))
                {
                    gzip.Write(raw, 0, raw.Length);
                }
                return memory.ToArray();
            }
        }