hello , i want save to MemoryStream , export the file by external code . but found that the export of the file can not be properly extracted.
public byte[] Compress(byte[] bytes)
{
Stream stream = new MemoryStream();
ZipStorer zip = ZipStorer.Create(stream, string.Empty);
Stream zipData = new MemoryStream(bytes);
zip.AddStream(ZipStorer.Compression.Deflate ,"default", zipData, DateTime.Now, string.Empty);
bytes = zip.Close(); // i change this code, make it can return byte[]
return bytes;
}
hello , i want save to MemoryStream , export the file by external code . but found that the export of the file can not be properly extracted.