I had a file (was a text file at first), did
xxd -r to it and saved it to tempfile2. Afterwards did
file tempfile2 and it wrote:
tempfile2: gzip compressed data, was "data2.bin", from Unix, last modified: Fri Nov 14 10:32:20 2014, max compression
gzip -d tempfile2>tempfile3 gzip -d tempfile2.gz > tempfile3 gzip -d tempfile2.gz > tempfile3.gz gunzip tempfile2 gunzip tempfile2.gz gunzip tempfile2 > tempfile3
... all combinations possible.
neither of that worked. It either said no such file in directory or
unknown suffix -- ignored