代码拉取完成,页面将自动刷新
同步操作将从 ayu6688/heatshrink 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/sh
BENCHMARK_OUT=benchmark_out
HS=../heatshrink
cd ${BENCHMARK_OUT}
# Files in the Canterbury Corpus
# http://corpus.canterbury.ac.nz/resources/cantrbry.tar.gz
FILES='alice29.txt
asyoulik.txt
cp.html
fields.c
grammar.lsp
kennedy.xls
lcet10.txt
plrabn12.txt
ptt5
sum
xargs.1'
rm -f benchmark.output
# Run several combinations of -w W -l L,
# note compression ratios and check uncompressed output matches input
for W in 6 7 8 9 10 11 12; do
for L in 5 6 7 8; do
if [ $L -lt $W ]; then
for f in ${FILES}
do
IN_FILE="${f}"
COMPRESSED_FILE="${f}.hsz.${W}_${L}"
UNCOMPRESSED_FILE="${f}.orig.${W}_${L}"
${HS} -e -v -w ${W} -l ${L} ${IN_FILE} ${COMPRESSED_FILE} >> benchmark.output
${HS} -d -v -w ${W} -l ${L} ${COMPRESSED_FILE} ${UNCOMPRESSED_FILE} > /dev/null
# compare file sizes
if [ $(ls -l ${IN_FILE} | awk '{print($5)}') != $(ls -l ${UNCOMPRESSED_FILE} | awk '{print($5)}') ];
then
printf "\n\n\nWARNING: size of %s does not match size of %s\n\n\n" \
${IN_FILE} ${UNCOMPRESSED_FILE}
else
printf "pass: -w %2d -l %2d %s\n" ${W} ${L} "${f}"
fi
rm ${COMPRESSED_FILE} ${UNCOMPRESSED_FILE}
done
fi
done
done
# Print totals and averages
awk '{ t += $2; c++ }; END { printf("====\nTotal compression: %.02f%% for %d documents (avg. %0.2f%%)\n", t, c, t / c) }' benchmark.output
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。