World Library  
Flag as Inappropriate
Email this Article

LHA (file format)

Article Id: WHEBN0000915695
Reproduction Date:

Title: LHA (file format)  
Author: World Heritage Encyclopedia
Language: English
Subject: Amiga, WinZip, AmigaOS, PeaZip, PKZIP
Collection: 1988 Software, Amiga, Archive Formats, Data Compression Software, File Archivers, Japanese Inventions
Publisher: World Heritage Encyclopedia

LHA (file format)

Filename extension .lzh, .lha
Internet media type application/x-lzh-compressed
Type code "LHA " (L-H-A-SPACE)
Uniform Type Identifier (UTI) public.archive.lha
Developed by Haruyasu Yoshizaki (Yoshi)
Type of format Data compression

LHA is a freeware compression utility and associated file format. It was created in 1988 by Haruyasu Yoshizaki (吉崎栄泰 Yoshizaki Haruyasu), and originally named LHarc. A complete rewrite of LHarc, tentatively named LHx, was eventually released as LH. It was then renamed to LHA to avoid conflicting with the then-new MS-DOS 5.0 LH ("load high") command. According to early documentation, LHA is pronounced like La.

Although no longer much used in the West, LHA remains popular in Japan. It was used by id Software to compress installation files for their earlier games, including Doom and Quake. LHA has been ported to many operating systems, and is still the main archiving format used on the Amiga computer, although it competed with LZX in the mid 90s. This was due to Aminet, the world's largest archive of Amiga related software and files, standardising on Stefan Boberg's implementation of LHA for the Amiga. Microsoft has released a Windows XP add-on, Microsoft Compressed (LZH) Folder Add-on, designed for the Japanese version of the operating system.[1][2] The Japanese version of Windows 7 ships with the LZH folder add-on built-in.[3] Users of non-Japanese versions of Windows 7 Enterprise and Ultimate can also install the LZH folder add-on by installing the optional Japanese language pack from Windows Update.


  • Compression methods 1
    • Canonical LZH 1.1
      • -lh0- 1.1.1
      • -lh1- 1.1.2
      • -lh4-, -lh5-, -lh6, -lh7- 1.1.3
      • -lhd- 1.1.4
    • Joe Jared extensions 1.2
      • -lh8-, -lh9-, -lha-, -lhb-, -lhc-, -lhe- 1.2.1
    • UNLHA32 extensions 1.3
      • -lhx- 1.3.1
    • PMarc extensions 1.4
      • -pc1- 1.4.1
      • -pm0- 1.4.2
      • -pm1- 1.4.3
      • -pm2- 1.4.4
      • -pms- 1.4.5
    • LArc extensions 1.5
      • -lzs- 1.5.1
      • -lz2- 1.5.2
      • -lz3- 1.5.3
      • -lz4- 1.5.4
      • -lz5- 1.5.5
      • -lz7- 1.5.6
      • -lz8- 1.5.7
  • See also 3
  • References 4
  • External links 5

Compression methods

In an LZH archive, the compression method is stored as a 5-byte text string. These are the third through seventh bytes of the file.

Canonical LZH

LHarc compresses files using an algorithm from Yoshizaki's earlier LZHUF product, which was modified from LZARI developed by Haruhiko Okumura (奥村晴彦 Okumura Haruhiko), but uses Huffman coding instead of arithmetic coding. LZARI uses Lempel–Ziv–Storer–Szymanski with arithmetic coding.


No compression method is applied to the source data.


This method is introduced in LHarc version 1.

It supports 4KiByte sliding window, with support of maximum 60 bytes of matching length. Dynamic Huffman encoding is used.

-lh4-, -lh5-, -lh6, -lh7-

Methods 4, 5, 6, 7 support 4, 8, 32, 64 KiByte sliding window respectively, with support of maximum 256 bytes of matching length. Static Huffman encoding is used. lh5 is first introduced in LHarc 2, followed by lh6 in LHA 2.66 (MSDOS), lh7 in LHA 2.67 beta (MSDOS). LHA itself never compresses into lh4.


Technically it is not a compression method, but it is used in .LZH archive to indicate the compressed object is an empty directory.

Joe Jared extensions

Joe Jared extended LZSS to use larger dictionaries.

-lh8-, -lh9-, -lha-, -lhb-, -lhc-, -lhe-

Dictionary sizes are 64, 128, 256, 512, 1024, 2048 Ki bytes respectively.

UNLHA32 extensions

UNLHA32.DLL uses its own method for testing purposes.


It uses 128-256 Ki bytes dictionary.

PMarc extensions

These compression methods are created by PMarc, an CP/M archiver created by Miyo. The archive usually has a .PMA extension.


PopCom compressed executable archive.


No compression method is applied to the source data.




Used to indicate PMarc self-extracting archive.

LArc extensions

LArc uses the same file format as .LZH, but was written by Kazuhiko Miki, Haruhiko Okumura, Ken Masuyama, with extension name '.LZS'.[2]


It supports 2KiByte sliding window, with support of maximum 17 bytes of matching length.


It is similar of -lzs-, except dictionary size and match length can be changed.



No compression method is applied to the source data.


It supports 4KiByte sliding window, with support of maximum 17 bytes of matching length.




There are copies of LHICE marked as version 1.14. According to Okumura, LHICE is not written by Yoshi.[4]

See also


  1. ^
  2. ^
  3. ^ You cannot install the Microsoft Compressed (LZH) Folder add-in in Windows 7
  4. ^

External links

  • A history of data compression in Japan
  • LHA Notes Document about LHA.
  • jLHA - LHA library for Java
    • jLHA front-end
  • LHA for Unix (Japanese)
  • Hacking Data Compression Lesson 11 LZH, LZARI, and LZB
  • NSRL Magic File contains PMarc info.
  • Explzh Current Windows 7 archiver for LZH/LHA. (Besides LZH it supports RAR,Zip,7Z,ACE,Tar,Cab & others)
  • lhasa a cross-platform, open source LHA decompressor
  • lzh format document describing LZH header format.
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.