diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpack/dml/scripts/compression/zzcd	Tue Feb 09 21:05:06 2016 +0100
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+# zzcd <compressor:process> <differ:(encode|decode) filename ... -> process> <reference:filename>
+# Applies <compressor> separately to reference, and to concatenation of reference and input,
+# then applies <differ> to the results.
+here=$(dirname "$0")
+compress="$1"
+diff="$2"
+ref="$3"
+shift 3
+prepend "$ref" | eval $compress | encode "$diff" <(cat "$ref" | eval $compress) "$@"
+
+