Click here to Skip to main content
11,477,625 members (75,081 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
I have a memory stream that contains a zip file in byte[] format .

Is there any way I can unzip this memory stream, without any need of writing the file to disk ?

In general I am using ICSharpCode.SharpZipLib.Zip.FastZip to unzip a file , But any way to unzip a memory stream ? and store the files in another memorystream or in byte[] format according to the files/folders present in the zip ?

Any way I can use the Memorymapped files feature in this scenario ?
Posted 3-Oct-12 11:03am
Pro Idiot1.8K
Edited 3-Oct-12 11:15am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

One way is to use GZipStream[^] class.

Have a look at the example in the documentation. Even though the example utilizes a FileStream, you can use basically any stream that's inherited from System.IO.Stream.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 274
1 Richard Deeming 245
2 _duDE_ 175
3 Tomas Takac 150
4 Sascha Lefèvre 145
0 Sergey Alexandrovich Kryukov 7,675
1 OriginalGriff 7,256
2 Sascha Lefèvre 3,034
3 Maciej Los 2,491
4 Richard Deeming 2,305


Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 3 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100