Settings

Theme

Compression and Concatenation on the Web

theconsensus.dev

8 points by eatonphil · 4 comments

Reader

3 threads
ryan-c

Oh, neat, this mentions my patch to rust-brotli! FWIW, I do not, an never have, worked for Dropbox. ;-)

A similar tool would be possible for gzip - I made one a long time ago that could append a literal stored block to the end of a gzip stream.

One note about brotli - appendable chunks after the first will generally have a worse compression ratio because they can't reference brotli's built in preshared dictionary, but my use case was appending a small amount of dynamic data to an otherwise static file, where this isn't a significant problem.

pveierland

I'd love to use more brotli and zstd, but for some reason browsers seem to support these in fetch requests but not in the DecompressionStream API, meaning that you need to bundle your own decompressors if you want to do this for other use-cases.

https://developer.mozilla.org/en-US/docs/Web/API/Decompressi...

alexandrehtrb

This is interesting, but how would this work for different files? Like merging index.html, style.css, index.js in a single response.

  • throwway262515

    No, there’s no tar or zip archive feature of storing multiple files with their individual names.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection