I'll try to explain shortly what I am trying to do. There is a binary that is executed on linux based satellite receivers. And I've seen compressed version of these binaries which also run fine and take half the space regular one does. And it is useful on receivers with a lack of free space.
So I contacted man who originally released these compressed versions. He told me that he just gzipped them and added few lines in file header.
Now the problem is that he didn't want to help me any further when I got stuck. I gzip the binary but if I try to edit it saved file will be corrupt.
Then I placed header from his compressed files in a file called "file1" then did
Code:
cat file1 file2.gz > finalfile
and that got me pretty close what the file should look like but it is not exactly it.
I'll post here what he got and then what I got but just few lines of the files to illustrate:
his version:
Code:
else
echo "Cannot decompress $0"
/bin/rm -rf $tmpdir
exit 1
fi; exit $res
‹ýzA¬Ńç}°¦±~ óx˝ľ†DMľ€ Ő jÉlČ–Mľ
what I got:
Code:
else
echo "Cannot decompress $0"
/bin/rm -rf $tmpdir
exit 1
fi; exit $res‹wźEcamd_3880iXç˙G
The difference is that his file has a break of line after header he added. After the "res". And when I did cat to join two files in one, it just continues binary code right after the "res" not in next line.
Now is there a way for me to do what he did, since he didn't answer to my question about that.