We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Software

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What is BinHex?

By S.A. Keel
Updated: May 16, 2024
Views: 7,070
Share

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.

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.

Share
EasyTechJunkie is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Discussion Comments
Share
https://www.easytechjunkie.com/what-is-binhex.htm
Copy this link
EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.

EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.