Skip to content

Instantly share code, notes, and snippets.

@parasew
Last active April 8, 2023 23:48
Show Gist options
  • Save parasew/8a4fc4bd9253b7270d908e0a23a75d7e to your computer and use it in GitHub Desktop.
Save parasew/8a4fc4bd9253b7270d908e0a23a75d7e to your computer and use it in GitHub Desktop.
# Test Command 8.0.0 PATCH
1 zlib, o6 oxipng -o 6 -i 0 --out 01_oxi_normal.png t.png 48290731 45277379
2 same, interlaced oxipng -o 6 -i 1 --out 02_oxi_normal_interlaced.png t.png 50144548 50144548
3 max zlib oxipng --zc 12 -o max -i 0 -a --out 03_zc12_b.png t.png 48290731 45277379
4 Zopfli oxipng -Z -o 6 -i 0 --out 03_oxi_normal_ZOPFLI.png t.png 47883283 47883283

Comparison of output file size for example images processed with oxipng. Comparing libdeflater 0.11.0 and 0.13.0

#!/bin/bash
wget -O t.png https://stsci-opo.org/STScI-01G8GYD8B1H306SSPR4MY6NGN0.png
# zlib
oxipng -o 6 -i 0 --out 01_oxi_normal.png t.png
oxipng -o 6 -i 1 --out 02_oxi_normal_interlaced.png t.png
oxipng --zc 12 -o max -i 0 -a --out 03_zc12_b.png t.png
# Zopfli
oxipng -Z -o 6 -i 0 --out 03_oxi_normal_ZOPFLI.png t.png
oxipng -Z -o max -i 0 --strip all --threads 8 --out
ls -la
@TPS
Copy link

TPS commented Apr 8, 2023

  • oxipng -o6 yields 48290731 (0.11.0) / 45277379 (0.13.0)
  • oxipng --zc 12 -o max 48290731 (0.11.0) / 45277379 (0.13.0)

@parasew Do you happen to have timing info for those gist trials? It'd be instructive to know how much longer 1 zip library took over the other to produce exactly the same-size file, even w/ the 6- vs 8- thread difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment