Friday, March 19, 2004


I'm lucky enough to be getting paid to write stuff against Whidbey right now. Although the tooling leaves something to be desired, the APIs are pretty solid, and it's been interesting using the new stuff. Today, I came across a namespace that I think falls squarely into the “I could never give up the CLR libraries, and now they're just getting better” camp:


It has classes like GZipStream in it. The wrap a regular stream, and compress or decompress whatever you pass through it. Nice, eh?


  1. Sweet. I complained about the absence of ZIP support in the framework a while back.
    Nice to see that it's being addressed in Whidbey.

  2. I've been playing around with the classes in the System.IO.Compression namespace. How the heck do you unzip .zip files using the GZipStream?

  3. System.IO.Compression.GZipStream

    > How the heck do you unzip .zip files using the GZipStream?

    For what there is so far in the framework, I don't think that's possible with any simple commands, except calling java equivalent perhaps.

    Currently the options seem to be

    a) use #ziplib if you do not require support for old pkzip archives (ones packed in DOS often years ago), this could probably be modified to use the Whidbey namespace, for what benefit - I am not sure.

    b) interop with the InfoZip's implementation of ziplib (good support for older stuff)

    c) few companies offer managed zip libs for a fee, these can be worse for old stuff than InfoZip - from what I've tested.

    d) organicbit ziplib wrapper - also few problems with older zip archives, ziplib does not support those entirely

  4. How to Use this in VBdot Frame Work 1.1

  5. Hi,

    Was wondered if this can be used for http compression. My website, has pretty big css and Js files, I heard that http compression will help reduce the size of the page.

    Any idea?


  6. Well, I suppose you could do it by coding, but I think it would in general be better to leave compression to the webserver. So I would stay away from System.IO.Compression for now and look for the configuration switch or whatever that enables this (it would depend on which webserver you're using if nothing else). No idea where that might be, but I'm sure if you took the time to do some research on Google you'd find something pretty quickly.