On 2008-05-29, radu <
lungu...@gmail.com> wrote:
> i have to make 2 programs: a program that converts .exe or .dll
> or .zip etc. into text file and a program that reads same text file
> and writes same binary file back. example data.exe->data.txt-
>>(transfer)->data.txt->data.exe
> the final text file can look like 4d 5a 90 00 etc. or 1100010011110
> etc. or タ セB セ@e@ etc. or ascii(021) ascii(019) ascii(077)
> ascii(111), i dont care.
These have existed for aeons, search for uuencode/uudecode or mime/unmime.
> i found it very difficult reading binary files with blockread and how
> does it looks what it reads?
It doesn't. It reads binary, IOW it just looks up the address in memory of
whatever variable you pass, and starts banging <count> bytes into it. And it
doesn't care if it fits.