Mercurial > hg > dtl-dml-cliopatria
annotate cpack/dml/scripts/compression/zbs @ 7:3c7cc53984a6 no-matlab tip
removed rcutils as seem incompatible with this version
(no history/2 defined)
author | wolffd.mail@googlemail.com |
---|---|
date | Wed, 25 Jul 2018 15:51:48 +0000 |
parents | 718306e29690 |
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 |