bdec.sh 414 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/bin/sh

AEC=../src/aec

if [ ! -f bench.rz ]; then
    echo "No encoded file found. Encoding now..."
    ./benc.sh
fi
rm -f dec.dat
bsize=$(stat -c "%s" bench.dat)
utime=$(
    (
        /usr/bin/time -f "%U" $AEC -d -n16 -j64 -r256 -m -c \
            bench.rz > dec.dat
    ) 2>&1
)
perf=$(echo "$bsize/1048576/$utime" | bc)
echo "*** Decoding with $perf MiB/s user time ***"
cmp bench.dat dec.dat