Category: 

What is BinHex?

Article Details
  • Written By: S.A. Keel
  • Edited By: Lauren Fritsky
  • Last Modified Date: 23 September 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
In late 19th-century London, mail was delivered to residential addresses up to twelve times each day.   more...

September 28 ,  1924 :  Two US military planes complete the first flights around the world.  more...

BinHex is a method used in computing to convert a binary file into a text format so that it may be transmitted over a network. This is an older file-encoding technique, devised as a means to help deal with early computer network communication protocols that were incapable of transmitting binary data. The files converted in this manner will have one of three possible filename suffixes: .hex, .hcx, or .hqx, depending on the version. The encoded file's text is readable in a plain text viewer, however, and the BinHex version decoding requirement appears on the first line of the file.

The first BinHex encoding technique was developed back in 1981 to deal with the then common practice where data transferred over communication channels was American Standard Code for Information Interchange (ASCII) text characters. This first implementation was devised by Tim Mann and used on the TRS-80® personal computers of the early 1980s. As the Apple® Macintosh computer emerged, the technique was ported to work with Macintosh® files and was further developed by a man named Yves Lempereur, who improved on the encoding speed and compression.

Ad

At its core, the original BinHex encoding method takes groups of four binary digits, or bits, in a binary file and represents them as a single hexadecimal digit, which are the numbers 0 through 9 and the letters A through F. Each hexadecimal digit can then be paired up with another and encoded as an ASCII text character. This is sometimes referred to as an 8-to-4 encoding, since the process uses eight bits to represent four. Of course, this makes the encoded .hex file much larger than its original binary counterpart, but the plain text can also be split up into separate files for transmission.

The BinHex encoding method also created an archival, or encapsulation, technique for dealing with the two-part nature of the early Apple® Macintosh® file format. These files had two primary components: a resource fork and a data fork. With a BinHex encoding, both of the Macintosh® file forks would be encapsulated into the encoding, allowing for the receiving end to decode the entire file. As a result, the encoding method became the primary archival and transmission format on the Macintosh® computers of the 1980s and 90s.

After establishing its foothold on the Macintosh®, the BinHex technique needed improvement. A second version was developed that no longer used hexadecimal encoding, instead implementing an 8-to-6 encoding technique, which reduced the encoded file size by half. These new compact files, though no longer technically hexadecimal in nature, still held onto the BinHex naming format, though changed the file extension to .hcx. This method had issues with computer systems that used non-English language characters, though, whereby the file would be damaged during the decoding process as some characters were being translated.

The final BinHex version fixed these issues by using only characters that wouldn't automatically be translated during decoding. The encoding method also included additional error checking techniques that ensured against any unintended changes to the text. These more stable encoded files were then given the .hqx suffix, but still retained the compression of their .hcx predecessors.

Ad

You might also Like

Recommended

Discuss this Article

Post your comments

exception 'Exception' with message 'error writing captcha: Duplicate entry '2147483647' for key 'PRIMARY'' in /ssd/www/wisegeek/public_html/_core/classes/public/Captcha.php:44
Stack trace:
#0 /ssd/www/wisegeek/public_html/_core/controls/public/ControlDiscussionPostBox.php(324): Captcha->createCaptcha()
#1 /ssd/www/wisegeek/public_html/framework/classes/Control.php(104): ControlDiscussionPostBox->preRender(false)
#2 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): Control->render()
#3 /ssd/www/wisegeek/public_html/tpl/default-nocustom-lu/pages/public/article/article.htm(526): Control->__toString()
#4 /ssd/www/wisegeek/public_html/framework/classes/Control.php(300): require('/ssd/www/wisege...')
#5 /ssd/www/wisegeek/public_html/framework/classes/Control.php(309): Control->requireTpl('pages/public/ar...', Object(PageArticleCom), true)
#6 /ssd/www/wisegeek/public_html/framework/classes/Control.php(131): Control->renderTpl('pages/public/ar...', Object(PageArticleCom))
#7 /ssd/www/wisegeek/public_html/framework/classes/FormDataControl.php(87): Control->renderTemplate()
#8 /ssd/www/wisegeek/public_html/framework/classes/Control.php(109): FormDataControl->renderTemplate()
#9 /ssd/www/wisegeek/public_html/framework/classes/ScriptPage.php(50): Control->render(false)
#10 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): ScriptPage->render()
#11 /ssd/www/wisegeek/public_html/framework/classes/Page.php(97): Control->__toString()
#12 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(443): Page->processRequest()
#13 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(7): PublicFrontController->renderPage()
#14 /ssd/www/wisegeek/public_html/index.php(11): PublicFrontController::run()
#15 {main}