annotate cpack/dml/scripts/compression/zdiff @ 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 #!/usr/bin/env bash
|
Daniel@0
|
2 # diff <reference:filename>
|
Daniel@0
|
3 # Produces on standard output ed script required to recreate standard input given reference.
|
Daniel@0
|
4 here="$(dirname "$0")"
|
Daniel@0
|
5 function encode { "$here/bufs" 1 "$here/prefix" <(diff -e <(xxd -p -c 1 < "$1") <(xxd -p -c 1)); }
|
Daniel@0
|
6 # function decode { "$here/bufs" 1 "$here/unprefix" <(cat) | patch -e -o >(xxd -r -p -c 1) <(xxd -p -c 1 < "$1"); }
|
Daniel@0
|
7 function decode { ("$here/bufs" 1 "$here/unprefix" <(cat) && echo ,p) | ed -s <(xxd -p -c 1 < "$1") | xxd -r -p -c 1; }
|
Daniel@0
|
8 "$@"
|
Daniel@0
|
9 xxd -c 1 -p | xxd -r -c 1 -p
|