Skip to content

0.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 13 Oct 15:29
5d00664

Release Notes

⚠️ BREAKING CHANGES

  • sqzer: Output has a new public field, lossless: the bytes hold exactly the samples the encoder was given. Code that builds an Output by hand sets it, and code that read Output::target to learn whether an encode was lossless reads the field instead (ADR-0012 D4)
  • metrics: Trial has a new public field, size: the bytes the trial encoded to. Search::run takes a closure that returns Scored, the output with its score and its size, in place of the pair of output and score. Code that builds a Trial or calls run adds the size
  • sqzer: Progress::Trial has a new field, size, the bytes the trial encoded to. A match that names every field adds it, or ..
  • sqzer: Target::Quality on a format set with Sqzer::format, or format in the npm package, whose encoder in this build only writes lossless is an error, where it encoded lossless and reported the quality: EncoderUnavailable with native-webp in available_in for WebP in the portable tier, as the README has said and the command line has done, and Unsupported for PNG, which no build writes lossy. Pass Target::Lossless instead, which is what the bytes were; a build with native-webp takes the quality (#56)
  • cli: --lossless and --preset lossless refuse -x png:optimize_alpha=true, which changes the colour under fully transparent pixels. Drop --lossless: PNG comes from a lossless-only encoder either way, so the file is the same. --json now reports such a run as "lossless": false

Features

  • codecs: -x png:colors=<2..=256> reduces a PNG to a palette, what rimage had as --quantization, through quantizr. -x png:dither=<0..=100> sets how much of the error is diffused, 100 by default. An image that already has that few colours is written exactly, at its own bit depth. The output is lossy: --json and the npm package say "lossless": false, {quality} in a --template renders lossy, and --lossless refuses the option (ADR-0012)
  • core: Encoder::exact says whether an encode at a lossless target keeps every sample under the given options. It defaults to true; a backend with an option that gives samples up overrides it, as oxipng does for png:colors and png:optimize_alpha
  • sqzer: Sqzer::lossy_options names the options set on the builder under which an encoder gives samples up, for a caller that wants to refuse a lossless target before encoding
  • cli: each entry of trials in a --json record carries size, the bytes that trial encoded to. -v prints it after the score, and the progress line shows it per trial
  • wasm: each Trial in trials, and what onTrial receives, carries size, the bytes that trial encoded to, so a page can plot quality against score and size as the search runs (#55)
  • wasm: options() lists the keys optimize and encode take, each with its default as the package spells it and its help, as codecs() lists the backend options: [{ key: "target", default: "70", help: "..." }, ...]. A key whose default depends on the image or the format says auto; one that does nothing when left out has none. The defaults are read from the library's builder, so a page can show every control at the package's default and drop its own copy (#57)

Bug Fixes

  • wasm: the npm package carries THIRD-PARTY-LICENSES.txt, the licence notice of every crate compiled into sqzer_bg.wasm, generated by cargo about from the wasm32 dependency tree as pack.sh builds the package, and the patent grant rav1e ships with its licence. The C library inside libdeflate-sys has its own MIT notice there, and avif-parse, under MPL-2.0, is listed with its repository. The package shipped its own two licence texts and nothing for the 170-odd crates in the module (#54)
  • cli: every release archive carries THIRD-PARTY-LICENSES.txt next to the binary: the notice of every crate compiled into it for that target, the C and C++ libraries of the native tier under the crates that vendor them, libwebp, libaom, libavif, libjxl and jpegli with the third-party code inside their trees, and the patent grants that travel with the AV1, WebP and JPEG XL licences. The archives shipped the project's own two licence texts and nothing else (#62)
  • sqzer: an explicit quality with no format, on a graphic the portable tier sends to lossless WebP, is reported as what it was: Output::target is Resolved::Lossless and Output::lossless is true, where the record said the quality asked for and lossless: false over the same lossless bytes. --json, {quality} in a --template and the npm package follow (#56)

Install sqzer-cli 0.4.0

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/sqzer-dev/sqzer/releases/download/v0.4.0/sqzer-cli-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/sqzer-dev/sqzer/releases/download/v0.4.0/sqzer-cli-installer.ps1 | iex"

Install prebuilt binaries via Homebrew

brew install sqzer-dev/tap/sqzer

Download sqzer-cli 0.4.0

File Platform Checksum
sqzer-cli-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
sqzer-cli-x86_64-apple-darwin.tar.xz Intel macOS checksum
sqzer-cli-x86_64-pc-windows-msvc.zip x64 Windows checksum
sqzer-cli-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
sqzer-cli-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
sqzer-cli-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum