annotate cpack/dml/scripts/compression/zzcd @ 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 #!/usr/bin/env bash
Daniel@0 2 # zzcd <compressor:process> <differ:(encode|decode) filename ... -> process> <reference:filename>
Daniel@0 3 # Applies <compressor> separately to reference, and to concatenation of reference and input,
Daniel@0 4 # then applies <differ> to the results.
Daniel@0 5 here=$(dirname "$0")
Daniel@0 6 compress="$1"
Daniel@0 7 diff="$2"
Daniel@0 8 ref="$3"
Daniel@0 9 shift 3
Daniel@0 10 prepend "$ref" | eval $compress | encode "$diff" <(cat "$ref" | eval $compress) "$@"
Daniel@0 11
Daniel@0 12