Daniel@0: #!/bin/sh
Daniel@0: if [ $# -lt 2 ]; then
Daniel@0: 	echo 'Usage: encode <method> <reference> ...'
Daniel@0: 	echo
Daniel@0: 	echo 'Do differential compression using the script <method>.'
Daniel@0: 	echo 'The reference/source/dictionary may be a file or a process redirection.'
Daniel@0: 	exit 1
Daniel@0: fi
Daniel@0: set -o nounset
Daniel@0: here="$(dirname "$0")"
Daniel@0: diff="$1"
Daniel@0: ref="$2"
Daniel@0: shift 2
Daniel@0: "$here/bufs" 2 "$here/$diff" encode "$ref" "$@"