CompuServe Thread

#Repair messed-up DL?

3 messages in this thread
#117814From: Fred BassAug 25, 1990 12:19 PM
I've DL'd a GIF file from a local BBS…either the file or DL got messed up. Seems 128 bytes of garbage got appended to the BEGINNING of the file; I found the GIF header at location $80, instead of $00. Any way of "throwing out" the first 128 bytes of a file?
#117912From: Harry CallesisAug 26, 1990 12:15 AM
Fred – The best way to do that would be to find a disk/file editor (like Zap or something) that will let you write a portion of the file, beginning with an offset and going for a certain length. You could then load the file into memory and tell the program to write the file from offset $80 to EOF to a different file name. That should solve the problem. Another possible but trickier solution is to find a text editor (not a WP) that will allow reading a file with control (non-ASCII) characters. VERY CAREFULLY delete the characters up to but not including the "GIF87a" string. When the last character is deleted, save the file (preferably to a different name in case something goes wrong) without adding/deleting/changing any other bytes. Make sure the etxt editor doesn't do any kind of translation (like removing $0A bytes (line feeds) that follow $0D bytes (returns), or using $1A (control-Z) as end if file). I know of at least one text editor on the MSDOS machines that will do this, but I don't have any information on Amiga text editors in situations like this. Hope some of this helps. Harry
#118228From: Darron C. KnutsonAug 29, 1990 3:43 PM
Fred, I wager that the GIF file you got was produced on a Mac. The Mac includes a 128 byte binary header for all its files. This header contains information concerning the program that created the file and the icon image for the Mac Desktop. Most Mac term programs will automatically include this header in all file transfers on the assumption that any other user of the file will be using a Mac. Tell the person who posted the GIF file on the local BBS to turn off the MacBinary feature of his term program when uploading GIF files intended to be viewed on other types of computers. I ran into this same problem. I solved the problem by editing the GIF file in TxED, which will load files that contain binary. Simply delete the material preceding the "GIF87a" label. Darron