LHA was a compression algorithm popular in the early 1990s, especially on Amiga computers. It was similar in concept to Zip on PCs, but was slightly more efficient. Amiga software was frequently distributed in LHA file format.
Most modern PC file decompressors, such as 7zip and WinRAR, can extract the LHA file format. If you need to extract an LHA file on an Amiga or an emulator, the most popular LHA utility was called LhA, written by Stefan Boberg.
Dealing with the LHA file format today
If you’re into retro computing, especially Amigas, all of the software on Aminet and on the Fred Fish disks is in LHA format. And if you don’t care much about the history, let’s just get on with how you use the files.
On a PC, you can extract the files with most popular file archivers. 7-Zip and WinRAR both handle LHA files just fine. If you use WinUAE, you can mount a file path as a hard drive on the emulated Amiga and use that directory on your PC to transfer the extracted files to your emulated Amiga.
If you have a real Amiga, the easiest way to transfer files is to write them to 720K DOS-formatted floppy disks. Most versions of Amiga OS had utilities to read PC floppies. You can also hack a Gotek floppy emulator to work in your Amiga, then write your files to ADF format to a USB stick and read the emulated floppies on your Amiga.
If you want to work with LHA-formatted files straight on an Amiga, get a copy of LhA. You can get a self-extracting copy of LhA from Funet. The evaluation version of LhA 1.38 will get you started. Just run the self-extracting archive to extract the LhA executable, then copy it somewhere in your path. Maybe it’s bad form to copy it into your c: directory but that’s what I always did.
To extract an archive, just use the command lha x filename.lha — it’s very similar to any other command-line archiver. Just running the lha command with no arguments gives you a list of options.
Why the LHA file format was popular
Why didn’t Amiga users just use Zip like everyone else? In the 80s and 90s, virtually every operating system had its own popular compression format. Virtually every computer platform had a utility called Arc. But not every implementation of Arc was compatible, and its compression was pretty crude by modern standards. As computers became more powerful, better compression methods popped up on various platforms, all independent of one another. At least in North America, PCs settled on Zip. Macintoshes settled on a program called Stuffit. And Amigas settled on a format called LZH.
Unseating Arc took some doing. Stuffit became the standard for Macs because it could deal with the idiosyncrasies of that platform’s disk format. Zip unseated Arc because it was faster and more efficient. LZH was more efficient than Zip but not as fast, at least if it was running on comparable hardware. But in a multitasking environment, Amiga owners didn’t mind. They could switch to another task and do something else while the file decompressed, rather than just staring at a progress bar.
But then something happened on the Amiga platform that doesn’t usually happen. LZH fell from grace, replaced by newer and better technology. In all fairness, LHA was an extension of LZH, but still, it’s unusual for a platform that existed on the market for about a decade to go through three standards while PCs, which are approaching their fourth decade, have been using Zip since 1989.
Why Amigas switched to LHA
The LHA file format became popular on Amigas in 1990 thanks to the utility LZ, written by Jonathan Forbes, which was then supplanted in late 1991 by LhA, written by Stefan Boberg. A similar and compatible archiver appeared on the PC earlier and became popular in Japan, but didn’t gain acceptance in the United States and Europe. I think there were at least three reasons for it.
The most popular file format for the Amiga at the time was LZH, and both LZ and LhA could create and decompress LZH files. The advanced command line options might have been a little different from the LZH-compatible archiver an Amiga user was already using, but for everyday use there wasn’t much adjustment. And the Amiga’s command line had an alias command, so you could create an alias for the old command to redirect it to a new one if you were used to typing something else.
When I got my Amiga, everyone used LZ. Then LhA came out and word spread quickly. I switched and so did everyone else I knew.
LhA was faster
LhA had two things going for it: It implemented a very efficient compression algorithm, and the code itself was really fast. Stefan Boberg wrote his implementation in 68000 assembly language, and the resulting code ran faster than similar programs written in C. C is fast, but the C compilers of the early 1990s couldn’t keep pace with a skilled assembly programmer.
We may have paid a speed penalty for using LZ over something older. But that speed penalty evaporated once we had LhA.
On the Amiga, the best technology stood a chance
In free markets, it’s not usually the best technology that wins. If someone else can come along with something almost as good that’s cheaper, that’s usually the one that wins. That explains the popularity of Intel x86 CPUs and VHS VCRs. The alternatives were demonstrably better, but the cheaper, easier-to-buy standard eventually won.
That’s why the Amiga died out. In 1985 when it came out, it was competing with 286-based PCs that were half as fast and cost twice as much. But by 1994 when Commodore went bankrupt, that wasn’t true anymore. It was the Amiga that was half as fast (at least on paper) and cost twice as much, because Intel cut its prices every quarter and Commodore couldn’t afford to do that on the Amiga’s custom chips.
But in the meantime, the Amiga attracted an ecosystem that runs counter to market norms. PCs were a mass-market technology, or at least became one. Amigas were not. Amigas attracted bleeding-edge types. Where Apple attracted its following with elegant design, Amiga owners often admired technology for technology’s sake.
How Amiga culture was different
Generally speaking, a PC owner would recommend a program because it was what most other people used. They valued interoperability. A Mac owner would recommend a program because it was easy to use and/or had an elegant design. An Amiga owner would recommend a program and tell you why it was better than any other. LhA included a bunch of data in its readme file proving why it was better. In a culture where technology is art, that makes for an effective marketing campaign.
And in the case of the LHA file format, archives taking up less space on the BBS operator’s hard drive and yours was a compelling argument. And at a time when a fast modem operated at 9.6 or 14.4 kilobits per second and tied up your phone line, rather than a gigabit per second always-on connection like today, the faster download speeds from the smaller file size made a difference too. It meant you didn’t tie up your phone line as long. And LhA’s fast decompression speeds? That just made it even better.
This is the best self-extracting version of LhA to use these days: http://aminet.net/package/util/arc/lha