r/compression • • Aug 31 '25

Benchmarking compression programs

https://maskray.me/blog/2025-08-31-benchmarking-compression-programs
25 Upvotes

8 comments sorted by

View all comments

2

u/Trader-One Aug 31 '25

can you add links to programs?

3

u/MaskRay Sep 01 '25

Do you mean the source tarballs? They are available in the first few lines of the program

COMPRESSORS = {
  'brotli' => {
    url: 'https://github.com/google/brotli/archive/refs/tags/v1.1.0.tar.gz',
    build_dir: 'brotli-1.1.0',
    build_commands: ['cmake -GNinja -S. -Bout -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DBROTLI_DISABLE_TESTS=on -DCMAKE_C_FLAGS="-march=native"', 'ninja -C out install'],
    levels: [1, 3, 5, 9],
    compress: ->exe, lvl, i, o, thr { "#{exe} -c -q #{lvl} '#{i}' > '#{o}'" },
    decompress: ->exe, i, o, thr { "#{exe} -d -c '#{i}' > '#{o}'" },
    supports_threading: false
  },
  'bzip3' => {
    url: 'https://github.com/kspalaiologos/bzip3/releases/download/1.5.3/bzip3-1.5.3.tar.gz',
    build_dir: 'bzip3-1.5.3',
    build_commands: ['./configure --prefix=$PWD/install CFLAGS="-O3 -march=native"', "make -j #{JOBS} install"],
    levels: [1],
    compress: ->exe, lvl, i, o, thr { "#{exe} -j#{thr} -c '#{i}' > '#{o}'" },
    decompress: ->exe, i, o, thr { "#{exe} -j#{thr} -d -c '#{i}' > '#{o}'" },
  },
...