Convert LHA to TAR.BZ2 Online (Huffman-Era Compression Meeting Burrows-Wheeler)
LHA compresses with 1980s-style Huffman coding in a single step; tar.bz2 runs a completely different algorithm after bundling files the Unix way.
- Add a file Choose or drop it here
- Pick the format Change it whenever needed
- Download the result After conversion completes
Two Formats From Two Very Different Compression Traditions
LHA — carrying either the .lha or .lzh extension — was created in 1988 by Haruyasu Yoshizaki, whose LHarc tool combined LZSS-style dictionary matching with Huffman coding under the name LZHUF. Tar.bz2 is not one format but two layered together: TAR, the decades-old Unix utility that bundles files with a small header before each one but applies no compression itself, and bzip2, a compressor released in 1996 by Julian Seward that works in a fundamentally different way from LHA — it uses the Burrows-Wheeler transform to rearrange data into long runs of similar bytes before compressing it, rather than searching for repeated byte sequences in a sliding window the way LHA's LZSS-based methods do.
Converting an LHA archive to tar.bz2 requires two distinct steps: decompressing the original LHA entries — typically packed with the -lh5- method's 8 KiB window and static Huffman coding — bundling the decompressed files into a plain TAR stream, and then compressing that entire TAR stream as one continuous block using bzip2. The order matters: bzip2 is applied to the whole bundled archive at once, not to each file separately the way LHA tags each entry with its own method.
LHA also carries its own per-entry header level (0 through 3), which controls how metadata like file timestamps is stored — level 0 and 1 headers pack the year into a 7-bit field that can't represent years past 2011 correctly, while level 2 and 3 headers use a full 32-bit Unix timestamp instead. TAR's own header format uses a different, older octal-encoded timestamp field, meaning the conversion process has to translate LHA's timestamp representation into TAR's during the bundling step, not just carry raw bytes across unchanged.
Why Bzip2's Block-Sorting Approach Works Differently From LHA's Sliding Window
LHA's compression methods work by finding repeated sequences within a limited window — up to 64 KiB in the most advanced -lh7- method — and replacing them with shorter references, then applying Huffman coding to reduce the size of what's left. Bzip2 takes an entirely different route: it processes data in blocks of up to 900 KB, uses the Burrows-Wheeler transform to reorder each block so that similar bytes cluster together, and then applies a move-to-front transform followed by Huffman coding on the reordered result. That block-sorting step is why bzip2 tends to do especially well on repetitive text and source code, often beating LHA's method noticeably on that specific kind of content, even though bzip2 itself is not the newest or fastest compressor available today.
Because bzip2 compresses the whole bundled TAR stream as one unit rather than file by file, it can find repeated patterns across file boundaries within each 900 KB block — something LHA's per-entry method tagging never does, since every file in an LHA archive is compressed independently of its neighbors. For an archive containing many small, similar files, this cross-file view can produce meaningfully better compression than repacking the same files through LHA's own methods ever could.
What Changes Moving From LHA to the TAR.BZ2 Combination
- Gain — often better compression on text and code: bzip2's Burrows-Wheeler block sorting frequently beats LHA's Huffman-based methods on repetitive text content specifically.
- Gain — a widely maintained, still-current compressor: bzip2 remains actively supported across Linux distributions, while LHA's tooling has had no meaningful development in years.
- Lose — LHA's narrow legacy compatibility: Amiga software and old Japanese-market programs expecting .lha or .lzh files won't recognize a tar.bz2 archive.
- Gain — native handling on virtually every Linux system: the tar command with bzip2 support is standard on Linux and macOS, unlike LHA, which needs a specific separate tool almost everywhere.
- Lose — LHA's smaller compression window advantage on tiny files: bzip2 has meaningful per-block overhead that can make it perform worse than LHA's methods on very small individual files, even though it usually wins on larger, more repetitive data.
- Gain — random access at the file level via TAR's structure: once decompressed, the TAR layer's per-file headers make it straightforward to locate individual files, something that requires understanding LHA's own header-level and method-tag system instead.
- Lose — LHA's simpler single-pass structure: tar.bz2 requires understanding two separate formats stacked together, while LHA combines bundling and compression into one self-contained archive type.
Software That Actually Handles Each Half of This Conversion
Bzip2 support ships as a standard part of GNU tar on virtually every Linux distribution, accessible directly through tar's -j flag, and macOS includes the same GNU or BSD tar functionality built in. Windows has no native command-line bzip2 support, but 7-Zip handles tar.bz2 archives without any extra plugin, since 7-Zip supports both the TAR container and bzip2 decompression as part of its standard feature set.
Opening the original LHA file to begin the conversion is the harder half of this pairing. Windows has never included native LHA/LZH support, and the standard 7-Zip release doesn't include it either, despite years of user requests on the project's own forum. PeaZip is one of the few current archivers that lists LHA/LZH directly among its supported formats, and WinRAR can extract (though not create) LZH files as one of its listed "other formats." Getting from LHA to tar.bz2 in practice usually means using one tool to open the LHA archive and a separate, more common tool — like 7-Zip or GNU tar — to build the final tar.bz2 file.
The Actual Problems People Report With This Specific Conversion
The most basic complaint is the same starting point every LHA conversion runs into: no installed software recognizes the .lzh file at all, since neither Windows nor standard 7-Zip supports it, forcing a search for a specific tool like PeaZip before anything else can proceed.
A second issue specific to bzip2 is unexpectedly worse-than-hoped compression on archives full of many very small files — bzip2's block-based approach carries fixed overhead per block that becomes proportionally larger relative to tiny files, meaning an archive of many small documents converted from LHA to tar.bz2 doesn't always shrink as much as expected, and can occasionally end up larger than the original LHA version for that specific reason.
A third, older concern involves LHA's own extraction software rather than the destination format: documented vulnerabilities (CVE-2004-0234 and CVE-2004-0235) let a maliciously crafted LHA archive trigger a buffer overflow or write files outside the intended extraction directory in the Unix lha tool through version 1.14. Using current, patched extraction software for the LHA half of the conversion avoids that specific, long-documented risk before the files ever reach the bzip2 compression stage.
A fourth issue involves garbled filenames carried over from the source archive: LHA files built on Japanese-locale systems commonly store filenames using Shift-JIS encoding, and if the tool used to extract them assumes a different encoding, the names come out as unreadable text before the TAR bundling step even happens. Since tar.bz2 has no mechanism of its own to fix filenames after the fact, correcting the encoding at the LHA extraction stage — using a tool that supports Shift-JIS detection — is the only point where this can actually be resolved.
LHA and TAR.BZ2 Side by Side
| Feature | LHA/LZH | TAR.BZ2 |
|---|---|---|
| Core compression method | LZSS matching plus Huffman coding | Burrows-Wheeler transform plus Huffman |
| Block/window size | Up to 64 KiB | Up to 900 KB per block |
| Compression scope | Per file | Across the whole bundled TAR stream |
| Native Linux/macOS support | None built in | Standard via GNU/BSD tar |
| Native Windows support | None | None built in; 7-Zip handles it |
| Best suited for | Small archives on constrained hardware | Repetitive text and source-heavy archives |
| Development status | Effectively frozen | Actively maintained |
Questions About Moving LHA Archives Into TAR.BZ2
Will tar.bz2 be smaller than the original LHA file?
Often, yes, especially for text-heavy or code-heavy content, since bzip2's block-sorting approach tends to outperform LHA's Huffman-based methods on that kind of repetitive data. For archives with many very small files, the result can vary.
Why does tar.bz2 have two extensions instead of one?
Because it's genuinely two separate steps: TAR bundles the files together with no compression, and bzip2 compresses that entire bundle afterward as a single stream, unlike LHA, which compresses and bundles in one pass.
Can Windows open a tar.bz2 file without extra software?
Not natively through File Explorer, but 7-Zip handles both the TAR and bzip2 layers without needing any additional plugin, making it the simplest single tool for this on Windows.
Why won't the original LHA file open on my computer?
Neither Windows nor the standard 7-Zip release includes native LHA/LZH support. A separate tool like PeaZip, which specifically lists LHA/LZH support, needs to be installed first.
Is bzip2 better than LHA's own compression?
For most typical archive content, yes, particularly text and source code, thanks to its block-sorting approach and much larger 900 KB block size compared with LHA's 64 KiB maximum window.