Leonard Rosenthol on Thu, 22 Aug 2002 23:50:11 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] MacBinary( was Re: reading old jpeg format?)


At 12:12 PM -0400 8/22/02, gabriel rosenkoetter wrote:
Ah, this might explain it:

# MacBinary format (Eric Fischer, enf@pobox.com)
#
# Unfortunately MacBinary doesn't really have a magic number prior
# to the MacBinary III format.  The checksum is really the way to
# do it, but the magic file format isn't up to the challenge.
#

Correct, which is why we solved that in MacBinary III...

# This attempts to use the version numbers as a magic number, requiring
# that the first one be 0x80, 0x81, 0x82, or 0x83, and that the second
# be 0x81.  This works for the files I have, but maybe not for everyone's.


The checksum, the version number and a few other things are the common way to determine MacBinary header presense.




Using that second matching method gets me:
humbug:~% file -m tmp/magic image.bin
file: Using regular magic file `tmp/magic'
image.bin: Macintosh MacBinary data, type "    ", creator "    "

Hah!

Trust me, this is NOT a MacBinary encoded file!!


Did you transfer it using binary or ascii mode? (The latter will
break that file, if it's really a MacBinary I file. That's what
BinHex and UUEncode are for.)

BinHex actually incorporates MacBinary-like encoding as part of the process - so BinHexing a MacBinary file is silly...



He's opening it because jpegViewer is doing on-the-fly decompression
of the MacBinary I format.

Nope, because it doesn't do that...


Leonard Chairman, MacBinary III Committee -- --------------------------------------------------------------------------- Leonard Rosenthol <mailto:leonardr@lazerware.com> <http://www.lazerware.com> _________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce General Discussion -- http://lists.netisland.net/mailman/listinfo/plug