annotate cpack/dml/scripts/compression/zbs @ 0:718306e29690 tip

commiting public release
author Daniel Wolff
date Tue, 09 Feb 2016 21:05:06 +0100
parents
children
rev   line source
Daniel@0 1 #!/bin/sh
Daniel@0 2 # dzbs <command:(encode|decode)> <reference:filename>
Daniel@0 3 # Use bsdiff to encode/decode standard input given data in <reference>
Daniel@0 4 function encode { bsdiff $1 $2 $3; }
Daniel@0 5 function decode { bspatch $1 $3 $2; }
Daniel@0 6 in=`mktemp -t bsdiXXX`
Daniel@0 7 out=`mktemp -t bsdoXXX`
Daniel@0 8 (cat > $in) && $1 $2 $in $out && cat $out
Daniel@0 9 rc=$?
Daniel@0 10 rm -f $in $out
Daniel@0 11 exit $rc
Daniel@0 12