viewing paste Unknown #17248 | Text

Posted on the
1 2 3 4 5 6 7 8 9
private byte[] compress(byte[] unzippedData)
        {
            using (MemoryStream compressedStream = new MemoryStream())
            using (DeflateStream zip = new DeflateStream(compressedStream, CompressionMode.Compress))
            {
                zip.Write(unzippedData, 0, unzippedData.Length);
                return compressedStream.ToArray();
            }
        }
Viewed 670 times, submitted by mrdiablo.