Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > BinHex VS MacBinary

BinHex VS MacBinary
Thread Tools
Junior Member
Join Date: Aug 2000
Location: Cambridge, MA
Status: Offline
Reply With Quote
Jun 4, 2001, 10:43 AM
 
What's the differences between the two and why is one superior to the other (or is it more a "depending on what's being used" case)? As much info as possible is appreciated. Thanks!
JGD
--

20" iMac G5 & 20 GB U2 iPod
     
Forum Regular
Join Date: May 2001
Location: Seattle
Status: Offline
Reply With Quote
Jun 6, 2001, 02:37 PM
 
BinHex makes bigger files, but is more compatible. MacBinary makes smaller files but is less compatible.

If you're on a Mac and intend to send whatever file to a Mac, MacBinary is the better choice, imho. But if you're sending to a PC, go for BinHex or Base64.. Not many PCs can read MacBinary.

-peter, http://peter.neophiliadesign.com/
     
Dedicated MacNNer
Join Date: Nov 1999
Location: Georgetown, Demerara, Guyana
Status: Offline
Reply With Quote
Jul 27, 2001, 05:58 PM
 
Hi all,

AFAIK, the MacBinary format and the BinHex format are similar in that they both attempt to encode a "complex" file -- e.g., a Macintosh file that usually has up to two forks (data & resource) as well as enhanced catalogue info such as creator/type codes -- into a "flat" file having just a data fork (whose delimited contents consist roughly of a "header" portion with the encoded catalogue info, followed by the data from each of the original file's forks). This transformation is useful/required for transmitting a Mac file over non-AppleTalk networks (such as the Internet) that typically don't understand multi-forked files or enhanced catalogue info.

The latest version of MacBinary (III) does a more thorough job with catalogue info than the common version of BinHex (4.0), as the former also caters for the extended Finder flags of Mac System 7.x - Mac OS 9.x.

However, probably the most important difference is that, in MacBinary, the data still remains in binary format -- i.e., a stream with standard 8-bit bytes. On the other hand, in BinHex (4.0), the data is converted into pseudo-ASCII text -- i.e., a stream whose bytes represent 6-bit "units" such that each 6-bit sequence from the original file is mapped to an 8-bit byte of which only the lowest 6 bits are significant (in other words, each 6-bit sequence is mapped to a char taken from a restricted table of 64 chars).

So, although the BinHex format specifically allows RLE compression prior to encoding, the 6-bit-to-8-bit expansion tends to yield larger files, as neophilia pointed out above. However, by the same token, BinHex is also more compatible with older Internet gateways that expect only ASCII streams [and could therefore incorrectly clear the high bit(s) in each byte]. This is probably why most Mac files distributed online are traditionally BinHex'd (even if they have also first been MacBinary'd). [Although, as the Internet marches along and gateways get upgraded, this is becoming less of an issue. E.g., I believe that newer versions of BinHex (5.0+ ?) are more like MacBinary in that they too specify a "binary" 8-bit encoding. In any event, many Mac files are now being distributed in a binary flat-file format (e.g., MacBinary, or recent versions of Stuffit).]

Apart from these technicalities, there's also the issue of whether decoders are available for a particular format on a given platform, as neophilia also mentioned in the above post. Although, perhaps with the growing availability of multi-format-aware decoders on non-Mac platforms (e.g., Stuffit Expander for Windows), this might also be less of an issue nowadays.

For details on both the MacBinary (I, II & III) format and the BinHex (4.0) format, see Leonard Rosenthol's Mac Formats web page. [BTW, thanks are due to Leonard, of ex-Aladdin (Stuffit Deluxe) and ex-Adobe (ImageReady / InDesign) fame, and still a very busy developer, for finding the time to oversee the development of MacBinary III.]

Regards,

--Paul
     
Professional Poster
Join Date: Jul 2001
Location: Dis
Status: Offline
Reply With Quote
Jul 29, 2001, 01:52 AM
 
Depending on your purpose, you may also want to consider .img (OS9 and earlier disk image), .dmg (the ones we see all the time when we download OSX files; can be made with a utility called dmgMaker), and the old Unix standby, tarballs (.tar.gz). I don't know anything about these than the fact that they exist, and that the tarballs do a good job of compressing things.

BlackGriffen
I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use. -Galileo Galilei, physicist and astronomer (1564-1642)
     
Registered User
Join Date: Jul 2001
Location: Orange County, CA
Status: Offline
Reply With Quote
Jul 31, 2001, 02:42 AM
 
Originally posted by BlackGriffen:
<STRONG>Depending on your purpose, you may also want to consider .img (OS9 and earlier disk image), .dmg (the ones we see all the time when we download OSX files; can be made with a utility called dmgMaker), and the old Unix standby, tarballs (.tar.gz). I don't know anything about these than the fact that they exist, and that the tarballs do a good job of compressing things.

BlackGriffen</STRONG>
It seems that more and more OS X freeware/shareware apps are using .dmg to archive files. Just my observation.
     
Forum Regular
Join Date: Nov 2000
Location: Menlo Park, CA, USA
Status: Offline
Reply With Quote
Aug 4, 2001, 03:07 AM
 
And some more BinHex Info on my web site:

http://www.natural-innovations.com/boo/binhex.html

-Walter
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:50 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2