public static byte[] Compress(byte[] data) { MemoryStream instream = new MemoryStream(data); MemoryStream outstream = Lzma.Compress(instream); return(outstream.ToArray()); }
public static MemoryStream Compress(MemoryStream instream) { MemoryStream outstream = new MemoryStream(); Lzma.Compress(instream, outstream); return(outstream); }