+#!/bin/bash
+
+if [ -z "$1" ]; then
+ echo "Falta parĂ¡metro: ./test_calgary_zip.sh [gzip|bzip2]"
+ exit 1
+fi
+
+if [ ! -e bib ] ; then
+ echo "Descomprimiendo Calgary Corpus Suite ..."
+ if [ ! -e calgary.tar.bz2 ] ; then
+ echo "NO EXISTE cagary.tar.gz ... abortando"
+ fi
+ tar -xjf calgary.tar.bz2
+fi
+
+for file in bib book1 book2 geo news obj1 obj2 paper1 paper2 paper3 paper4 \
+ paper5 paper6 pic progc progl progp trans; do
+ echo "===================================="
+ time $1 -c $file > $file.$1 2> /dev/null
+ echo "print '$file: ', `stat -c "%s" $file.$1`*8.0/`stat -c "%s" $file`, ' bpb'" | python
+done
+echo "===================================="
+