Zip and unzip a string of data in memory

I was looking for a way to zip and unzip a file.

Normally, this is not really an issue. There are lots of libraries and NuGet packages available.

But this file was represented to me as a string, some JSON, actually.

So I was looking for a way to convert a string into some zipped format and back. This was harder than expected.

In the end, I wrote a solution myself. Here it is for you to use it, just to save you a lot of time.

Note: This library is available on GitHub. And Visual Studio users can import the NuGet package.

Doorgaan met het lezen van “Zip and unzip a string of data in memory”

Advertenties