Compression and Concatenation on the Web

(theconsensus.dev)

8 points | by eatonphil 1 day ago

3 comments

  • ryan-c 1 minute ago
    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 55 minutes ago
    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 39 minutes ago
    This is interesting, but how would this work for different files? Like merging index.html, style.css, index.js in a single response.