4 comments

[ 0.30 ms ] story [ 3.7 ms ] thread
This is interesting, but how would this work for different files? Like merging index.html, style.css, index.js in a single response.
No, there’s no tar or zip archive feature of storing multiple files with their individual names.
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.