zlibVB.NET

Recovered from my original PJ on Development website. The original article appears below, followed by my review from November 2026. Historical claims and examples are preserved as written.

Original article — October 18, 2007

zlibVB.NET

DISCLAIMER

The Software is provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non-infringement. in no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

Introduction

Some time ago I was woking on a project and needed to decompress a GZIP stream, searching on the Internet I found several commercial libraries to do the job, but very few for the .NET platform and the ones I've found too expensive for my poor budget.

Once again I rolled up my sleeve and coded my own.

I got the original zlib from Jean-loup Gailly and Mark Adler and made my port to VB.NET. The first version of this small library was written in .NET 1.1, this version is just a rewrite to the .NET 2.0.

Limitations

Currently the zlib.NET only decompress GZIP files and streams compressed using the deflate algorithm.


Looking back — November 2026

Originally published October 18, 2007. Revisited November 2026 as part of the recovered PJ on Development collection.

Status: Historical project. The GitHub repository is archived and read-only.

The problem I was solving

I needed to decompress a GZIP stream and did not find a suitable affordable .NET library in my initial search. So I took the considerably more ambitious route: porting code from zlib into VB.NET. The article credits the original work by Jean-loup Gailly and Mark Adler.

What the project does

The published library supports decompression of GZIP files and streams using the deflate algorithm. Its first version targeted .NET 1.1, and the version described on the site was rewritten for .NET 2.0. It was a limited-purpose decompressor, not a replacement for every feature of zlib.

Looking at it today

There is real effort here, but also an instructive lesson about research. In a later blog post I described discovering the framework's GZipStream and DeflateStream classes while studying for certification. That made the custom implementation much harder to justify for the .NET 2.0 environment. Getting the port to work and deciding whether the port was necessary are different achievements.

Using the archive

The repository preserves the old code and its history. I would use a supported compression implementation for a new application rather than adopt this archive as a maintained library. Compression parsers need careful validation and resource-limit testing, and the original upstream attribution and licensing remain important when studying or redistributing a port.

Source and further reading

Comments