LHa is a command-line tool that enables the decompression and compression of .lha archives.
While LHA may not be as widely used in the West as it once was, it remains extremely popular in Japan. In fact, id Software even used LHA to compress installation files for some of its earliest games, including Doom and Quake. This versatility is due in part to the fact that LHA has been ported to a variety of operating systems and is the primary archiving format on the Commodore Amiga computer. Additionally, Microsoft has even released a Windows XP add-on designed for Japanese users called the Microsoft Compressed (LZH) Folder Add-on.
One of the most interesting things I learned during my testing of LHa software is that the compression method utilized by LHA is stored as a 5-byte text string, which is unique compared to other archiving formats. The canonical LZH compression method used by LHarc, for example, compresses files using an algorithm from Yoshizaki's earlier LZHUF product but employs Huffman coding instead of arithmetic coding.
Further, LHA offers a variety of compression methods, each with its own unique features and specifications. For example, the -lh0- method applies no compression to the source data, while the -lh1- method supports a 4KiByte sliding window with support for maximum 60 bytes of matching length, using dynamic Huffman encoding. Methods 4 through 7 ( -lh4-7-) employ static Huffman encoding and support sliding windows of 4, 8, 32, and 64 KiByte, with a maximum matching length of 256 bytes. The more recent -lh5-, -lh6-, and -lh7- methods offer even more advanced specifications.
Of course, this is just the tip of the iceberg when it comes to LHA's capabilities. For example, users can take advantage of Joe Jared extensions, which allow for larger dictionaries, or the UNLHA32 extensions, which use their own method for testing purposes. LArc extensions offer even more compression techniques, with -lzs- supporting a 2KiByte sliding window and a maximum matching length of 17 bytes, and -lz2- differing in its dictionary size and maximum match length capabilities.
Overall, I found LHa software to be a useful and versatile tool for handling .lha packages. The variety of compression methods available made it easy to find the best one for my specific needs, while the history and popularity of LHA itself provided peace of mind that I was using a tried-and-true archiving method.
Version 1.14i: N/A