Mercurial > hg > dml-open-cliopatria
diff cpack/dml/scripts/compression/rzp @ 0:718306e29690 tip
commiting public release
author | Daniel Wolff |
---|---|
date | Tue, 09 Feb 2016 21:05:06 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cpack/dml/scripts/compression/rzp Tue Feb 09 21:05:06 2016 +0100 @@ -0,0 +1,11 @@ +#!/bin/sh +# rzp (encode|decode) +# Use rzip to encode/decode standard input +set -o nounset +set -e +function encode { rzip -9 $1 -o $2 -f; } +function decode { rzip -d $1 -o $2 -f; } +in=`mktemp -t rziXXX` +out=`mktemp -t rzoXXX` +trap "rm -f $in $out; exit" EXIT INT KILL +(cat > $in) && $1 $in $out && cat $out