I was exploring the MDN docs and stumbled onto the newer CompressionStream API which enables a couple encodings to compress data streams; namely the popular classic GZIP, and a basic Deflate.
This is a neat first step for the client, but better newer compression encodings exist; these may be forth-coming to the native api one day; Brotli and ZSTD come to mind as the top current ones.
I wanted to test out all the available options I could find to see for myself. So first I searched and was able to find these libs:
High level I reckon ZSTDjs, ZSTDwasm, and then Brotli are top performers... here a screenshot of my findings
and the repo:
https://github.com/jswhisperer/compression-compare
Future Work for CompressionStreams API, seems like ZSTD and Brotli are green-lit, but how long for browsers to implement is unknown
Top comments (1)
Nice post.