Home | Notifications | New Note | Local | Federated | Search | Logout

Note Detail


Firefox for Web Developers@firefoxwebdevs@mastodon.social (2026-01-22 00:16:02)
In Firefox 147, you no longer need heavy libraries to (de)compress brotli with JS - you can just use CompressionStream and DecompressionStream!

Full documentation on MDN: https://developer.mozilla.org/en-US/docs/Web/API/Compression_Streams_API ---Attachments--- https://files.mastodon.social/media_attachments/files/115/933/741/927/955/389/original/d3cbbdf2aa4dc2eb.mp4
---Reply--- FND@FND@hachyderm.io (2026-01-26 17:32:03) @firefoxwebdevs thanks for this: it taught me a few tricks about working with streams, pretty timely too - so I wrote it up for (my own) future reference: https://prepitaph.org/snippets/text-compression/
Reply

---Replies---
Firefox for Web Developers@firefoxwebdevs@mastodon.social (2026-01-26 18:01:45)
@FND nice! Although, you don't need to go via a blob, you can get a byte array directly https://gist.github.com/jakearchibald/ae167aaec8bfa7272db2a6a00552e4b5