#!/bin/sh set -f if command -V gzip >/dev/null ; then has_gzip=1 ; fi if command -V brotli >/dev/null ; then has_brotli=1 ; fi if command -V zstd >/dev/null ; then has_zstd=1 ; fi do_gzip() { [ -s "$1.gz" ] || gzip -1kf "$1" || return ; comp_fixup "$1" "$1.gz" || rm -f "$1.gz" ; } do_brotli() { [ -s "$1.br" ] || brotli -1kf "$1" || return ; comp_fixup "$1" "$1.br" || rm -f "$1.br" ; } do_zstd() { [ -s "$1.zst" ] || zstd -q1kf "$1" || return ; comp_fixup "$1" "$1.zst" || rm -f "$1.zst" ; } float_div() { mawk -v "a=$1" -v "b=$2" 'BEGIN{print a/b;exit;}'