DEV Community

Cover image for Introducing Online GZIP de/compressor, built with Blazor WebAssembly
Niels Swimburger.NET ๐Ÿ”
Niels Swimburger.NET ๐Ÿ”

Posted on โ€ข Originally published at swimburger.net on

1 1

Introducing Online GZIP de/compressor, built with Blazor WebAssembly

Web Assembly (WASM) has allowed many different programming platforms to now be supported inside of the web browser. You can now develop C# .NET applications that run inside of the browser using Blazor WebAssembly.

A large amount of the .NET API is now usable right inside the browser when you use Blazor WASM. One of those API's is the GzipStream class which you can use to compress and decompress files using the GZIP algorithm. Unfortunately, the Brotli API's aren't supported in Blazor WASM.

Using Blazor WASM and the GZIP API's I created this little web application which you can use to compress and decompress multiple files using GZIP. All the files are de/compressed right inside of the browser without transmitting them to a server. This does mean that it is using your device to perform this task and the size of the files are limited depending on the limitation of your browser. Here's a preview:

Two files are dragged into the GZIP compression web application. The button "Compress Files" is clicked. The files are listed and have a loading animation next to their name. The files are compressed and downloaded back to the device.

The application also works offline and is installable thanks to the PWA capabilities built-in to Blazor WASM.

Both Windows, Mac, and Linux operating systems already have built-in ways to de/compress files using GZIP, but you can also use this tool if you prefer a web application over the command line utilities. You can find the source code on GitHub.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where youโ€™ll build it, break it, debug it, and fix it. Youโ€™ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good olโ€™ AI to find and fix issues fast.

RSVP here โ†’

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more