Convert LHA to TAR.GZ Online (A 1988 Japanese Format Meeting the Standard Unix Pairing)
LHA compresses with its own Huffman-based method tags; TAR.GZ splits the same job into two separate, much more common steps.
- Add a file Choose or drop it here
- Pick the format Change it whenever needed
- Download the result After conversion completes
A Single Japanese Compression Tool Meeting a Two-Program Unix Pipeline
LHA — the format behind both .lha and .lzh files — was created in 1988 by Haruyasu Yoshizaki, a medical doctor who wrote the original LHarc tool as a hobby project. It compresses using LZSS-style dictionary matching combined with Huffman coding under the name LZHUF, itself an adaptation of an earlier Okumura design called LZARI that used arithmetic coding instead. Every entry inside an LHA archive carries a method tag — -lh0- through -lh7- — describing exactly how it was compressed, with -lh5- and its 8 KiB sliding window becoming the de facto standard used by most LHA archives built through the 1990s.
TAR.GZ is built from two entirely separate, unrelated programs instead of one unified tool. Tar bundles files into a single continuous stream using 512-byte header blocks defined by the 1988 POSIX ustar standard, recording each file's name, size, and Unix permissions along the way. Gzip then compresses that finished stream afterward using DEFLATE, an algorithm with a much smaller 32 KiB compression window than LHA's later methods but one baked into essentially every modern operating system. Converting from LHA to TAR.GZ means decompressing each entry out of its LZHUF encoding, repacking the files into a fresh tar stream complete with standard headers, and then compressing that whole stream once with gzip.
Why One Combined Stream Compresses Differently Than LHA's Per-Entry Method Tags
LHA's method tags apply independently to each file inside the archive — one entry might use -lh0- (no compression) while another uses -lh5-, depending on what the original software decided was appropriate for that specific file. TAR.GZ works the opposite way: tar concatenates every file into one stream first, headers and all, and gzip compresses that entire combined stream as a single pass. That means gzip can exploit similarities between different files sitting next to each other in the stream, something LHA's per-entry method tags never do since each entry is compressed on its own.
The practical result depends heavily on what's being archived. A folder of many small, similar text files often compresses somewhat better once tar has concatenated them and gzip processes the combined stream, compared with LHA compressing each small file separately and paying its Huffman-table overhead repeatedly. A single large file, on the other hand, sees no such advantage — DEFLATE's fixed 32 KiB window and its long history as a fast, widely supported algorithm rather than the tightest possible one usually leave it behind LHA's later, larger-window methods like -lh6- or -lh7- on raw compression ratio for that kind of content.
LHA's header levels — 0 through 3 — also carry a specific, documented limitation that has nothing to do with compression at all: levels 0 and 1 pack file timestamps into a compressed 7-bit DOS-style year field never designed to represent years past 2011, while levels 2 and 3 switched to a full 32-bit Unix timestamp. A fresh TAR.GZ archive inherits none of that problem, since tar's own header format has stored dates as ordinary numeric fields since the 1988 POSIX standard.
What Rebuilding an Old LZH Archive as TAR.GZ Actually Changes
- Gain — a format essentially every OS already opens: gzip decompression ships in GNU tar, macOS's Archive Utility, and Windows 10's built-in tar.exe since the 2018 update, unlike LHA, which needs a specific separate tool.
- Lose — LHA's per-file method flexibility: each LHA entry could use a different method tag suited to that specific file; a TAR.GZ archive compresses the whole bundled stream with one gzip pass instead.
- Gain — freedom from LHA's Shift-JIS filename problem: archives built on Japanese-locale systems often store filenames in Shift-JIS encoding, which garbles into unreadable text on a system expecting a different default; repacking with UTF-8-based filename handling resolves this permanently.
- Gain — protection from documented LHA parsing vulnerabilities: CVE-2004-0234 and CVE-2004-0235 describe a stack-based buffer overflow and directory-traversal bug in the Unix lha tool through version 1.14, a risk that disappears once the data lives in a current, actively maintained format.
- Lose — nothing about the underlying file contents: extracting and repacking changes only the container and the compression pass, not the actual bytes of each file once decompressed.
- Gain — a natural fit with build and release tooling: "make dist" targets under the GNU Coding Standards default to producing .tar.gz output directly, so files already in that format skip a conversion step later projects would otherwise need.
Where TAR.GZ Just Works and Where LHA Needs a Specific Program First
GNU tar's -a (or --auto-compress) flag detects a .tar.gz or .tgz target filename automatically and calls gzip without any extra option needed, and that same detection has shipped in GNU tar for years across essentially every Linux distribution and macOS, both of which are Unix-based systems that inherited tar directly. Windows 10, starting with its 2018 update, added a native command-line tar.exe built on the libarchive project, letting a .tar.gz file get extracted straight from Command Prompt or PowerShell with nothing extra installed.
LHA has no equivalent free path on any current system. Windows has never included native LHA/LZH support in File Explorer, at any version, and the standard build of 7-Zip doesn't include it either — a long-requested feature on 7-Zip's own support forum that the maintainers have said would need a separate plugin. PeaZip is one of the few current mainstream archivers that lists LHA/LZH directly among its supported formats for opening and extracting, and WinRAR can extract (but never create) LZH files as one of its listed "other" formats. Between the two formats in this conversion, TAR.GZ needs nothing extra on a modern system; LHA still does.
Actual Complaints Reported Converting Old LZH Releases
The most frequent report is simply that nothing on a current computer will open the .lzh file at all — which traces directly to the fact that neither Windows nor stock 7-Zip includes LHA support, and the documented fix on forums covering this is installing PeaZip or another archiver that specifically lists LZH support, rather than assuming the download itself is broken.
A second recurring problem is garbled filenames surviving into the new archive: an LHA file built on a Japanese system using Shift-JIS filename encoding, extracted by a tool assuming a different default encoding, produces scrambled names that then get faithfully preserved inside the resulting TAR.GZ if nobody catches the problem before repacking. Fixing the encoding at extraction time, before the tar step runs, is the documented way to avoid carrying the same broken names forward into the new archive.
A third, more serious historical issue concerns security specifically: the CVE-2004-0234 and CVE-2004-0235 vulnerabilities affected the Unix lha extraction tool through version 1.14, letting a maliciously crafted .lzh archive trigger a buffer overflow or write files outside the intended folder when it was opened. Red Hat and Gentoo both issued advisories and patches at the time, and the underlying advice — extract old, unfamiliar LHA archives with current, patched software rather than a decades-old copy of the original tool — still applies before converting anything forward into TAR.GZ.
LHA/LZH and TAR.GZ Measured Against Each Other
| Feature | LHA/LZH | TAR.GZ |
|---|---|---|
| Created | 1988, Haruyasu Yoshizaki | Tar (1988 POSIX standard) plus gzip |
| Compression algorithm | LZSS/LZHUF, method tags -lh0- to -lh7- | DEFLATE, one pass over the whole stream |
| Native Windows support | None, at any version | Built-in tar.exe since Windows 10's 2018 update |
| Native 7-Zip support | None in the standard build | Built in, no plugin needed |
| Filename encoding risk | Shift-JIS garbling on non-Japanese systems | Standard UTF-8-based handling |
| Per-entry compression choice | Yes, tag per file | No, one gzip pass over the combined stream |
| Development status | Effectively frozen for years | Actively maintained (GNU tar, gzip) |
Questions About Turning Old LHA Archives Into TAR.GZ
Will converting from LHA to TAR.GZ make the file bigger or smaller?
It depends on the content. Many small, similar files can compress somewhat better once combined into one gzip-compressed stream, while a single large file often ends up slightly bigger, since LHA's later method tags use larger search windows than DEFLATE does.
Why won't my .lzh file open before I can even convert it?
Because neither Windows nor the standard release of 7-Zip includes native LHA/LZH support at all. A specific tool like PeaZip, which lists LZH support directly, generally needs to be installed first.
Why are the filenames inside my archive scrambled?
The original LHA file was likely built on a Japanese system using Shift-JIS character encoding, and whatever extracted it assumed a different default encoding. Fixing this before repacking as TAR.GZ avoids carrying the garbled names forward.
Can Windows open the resulting TAR.GZ file without installing anything?
Yes, on Windows 10's 2018 update or later, which added a native tar.exe command usable directly from Command Prompt or PowerShell, with gzip decompression built in.
Is it risky to open an old LHA file before converting it?
With unmaintained extraction tools specifically, yes — 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 folder in older lha software.
Does TAR.GZ preserve the same file permissions LHA might have recorded?
TAR.GZ generally preserves Unix-style ownership and permission bits directly in its tar headers, which is more consistent metadata handling than LHA's own header levels offer, especially the older level 0 and level 1 formats.