简体   繁体   中英

C# Export zip entries from one zipFile to other zipFile

Has zip file

Task:

  1. create target zipFile
  2. copy some entries from source to target

Task is solved: 1. open entry. 2. decompress to MemoryStream (sourceStream) 3. create entry (same name as source) on target zipFile 4. open target entry and copy sourceStream

All OK.

Problem: very slow, even using two Thread: one read, second write.

Question: Is there ability to get directly compressed data from source and directly write to target.

can use: IO.Compression or SharpZipLib or Package

Problem solved.

I use: http://github.com/jaime-olivares/zipstorer

and rewrite ExtractFileAsync to get raw compressed data

and rewrite AddStreamAsync to write raw compressed data without no change in attributes.

speed is maximum

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM