view 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
line wrap: on
line source
#!/bin/sh
# dzbs <command:(encode|decode)> <reference:filename>
# Use bsdiff to encode/decode standard input given data in <reference> 
function encode { bsdiff $1 $2 $3; }
function decode { bspatch $1 $3 $2; }
in=`mktemp -t bsdiXXX`
out=`mktemp -t bsdoXXX`
(cat > $in) && $1 $2 $in $out && cat $out
rc=$?
rm -f $in $out
exit $rc