Beispiel #1
0
        public static byte[] Compress(byte[] data)
        {
            MemoryStream instream  = new MemoryStream(data);
            MemoryStream outstream = Lzma.Compress(instream);

            return(outstream.ToArray());
        }
Beispiel #2
0
        public static MemoryStream Uncompress(MemoryStream instream)
        {
            MemoryStream outstream = new MemoryStream();

            Lzma.Uncompress(instream, outstream);
            return(outstream);
        }