proa
proa

Reputation: 129

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

Upvotes: 0

Views: 88

Answers (1)

proa
proa

Reputation: 129

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

Upvotes: 0

Related Questions