There are similar bindings for ruby: ruby-brs and ruby-zstds, it supports streaming API. It is possible to make easy benchmark between brotli and zstd.
You need to install recent version of sparsehash, brotli, zstd, image magick and ruby.
gem install bundler
bundle installPlease download recent versions of google fonts, static HTML dump of wikipedia and cdnjs.
git clone git@github.com:google/fonts.git --depth=1
rm -rf fonts/.git
mkdir wikipedia
wget "https://dumps.wikimedia.org/other/static_html_dumps/current/eu/wikipedia-eu-html.tar.7z"
7z x -so wikipedia-eu-html.tar.7z | tar xf - -C wikipedia
rm wikipedia-eu-html.tar.7z
git clone git@github.com:cdnjs/cdnjs.git --depth=1
rm -rf cdnjs/.git
./scripts/util/cleanup_cdnjs.sh cdnjsPlease run prepared process scripts.
./scripts/data/google_fonts.sh /mnt/data/fonts
./scripts/data/wikipedia.sh /mnt/data/wikipedia
./scripts/data/cdnjs.sh /mnt/data/cdnjsAccurate performance measurement requires running in single thread, so processing takes a lot of time.
It will populate results and update data folder. You can add your own custom script, please look at scripts inside scripts/data folder.
Please run prepared process scripts.
./scripts/chart/google_fonts.sh
./scripts/chart/wikipedia.sh
./scripts/chart/cdnjs.shIt will populate charts and update chart folder. You can add your own custom script, please look at scripts inside scripts/chart folder.
Chart folder path consist of name/extension/type/chart_type, files inside may be from_size - to_size.webp or all.webp.
For example chart folder path cdnjs/js/min/ratio, file inside 64 KiB - 128 KiB.webp.
type may be any/min/not_min.
Please read more about chart_type in lib/chart/process.rb.
Example:
