Convert LZO to TAR.GZ Online (From a Single Speed-Tuned File to a Portable Tarball)

Unpacking one lzop-compressed file and rebuilding it inside a gzip tarball trades LZO's near-instant decompression for DEFLATE's much broader everyday tool support.

  1. Add a file Choose or drop it here
  2. Pick the format Change it whenever needed
  3. Download the result After conversion completes

One Compressed File Becoming a Standard, Multi-File Tarball

A plain .lzo file holds exactly one compressed file — lzop, the utility Markus Oberhumer built around his own LZO compression library and first released on August 10, 1997, works on a single input at a time, the same way gzip does on its own. It doesn't bundle several files together the way tar does; a directory of files compressed this way becomes .tar.lzo (or its shorthand .tzo), never a bare .lzo. Converting a raw .lzo into .tar.gz therefore starts by decompressing that one file back to its original bytes with lzop, then handing the recovered file to tar, which wraps it in 512-byte header blocks recording its name, owner, permissions, and size, before gzip compresses the resulting stream with DEFLATE.

LZO's documented purpose is prioritizing decompression speed above almost everything else, including file size. Its default lzo1x_1 method does a simplified Lempel-Ziv-style scan for repeated byte sequences and deliberately skips the entropy-coding stage that DEFLATE adds on top of its own LZ77-style matching. That missing stage is exactly why gzip usually compresses the same data more tightly than LZO, while LZO decompresses faster because there's simply less decoding work left once the matching is undone.

Every lzop-produced file also opens with a fixed nine-byte magic sequence (0x89 0x4C 0x5A 0x4F 0x00 0x0D 0x0A 0x1A 0x0A), modeled deliberately on PNG's own signature style so corrupted or text-mangled transfers fail loudly instead of silently. The header that follows carries the compression method, level, and the original file's name, timestamp, and Unix permission bits — details a gzip tarball instead stores inside tar's own per-entry headers rather than a compressor-level header field.


DEFLATE's Extra Coding Stage Is What LZO Skips on Purpose

Gzip's DEFLATE algorithm, defined in RFC 1951, combines LZ77-style back-reference matching with Huffman coding, which assigns shorter bit patterns to more frequent byte sequences after the matching pass finishes. LZO's default method performs the matching step but stops there, leaving the matched output un-Huffman-coded — a deliberate design choice, not an oversight, since Huffman coding adds CPU overhead on both the compression and decompression side, and LZO's whole reason for existing is minimizing exactly that overhead.

This is why the same data usually shrinks further under gzip than under default LZO, and why LZO's own documentation offers higher-effort methods, up to lzo1x_999 via the --best flag, that narrow but don't eliminate that gap — LZO still skips entropy coding even at its most thorough setting, so its ceiling on ratio stays below what DEFLATE routinely achieves.

Gzip also checks its output differently than lzop does. A .gz file carries a single CRC-32 checksum covering the entire decompressed stream, computed once at the end. Lzop instead splits the compressed data into blocks and gives each block its own checksum, using the faster Adler-32 algorithm by default or CRC-32 if the --crc32 option is requested when the file is created. Both approaches can only detect corruption, not repair it, but lzop's per-block granularity means a single damaged block doesn't automatically make the entire rest of the file unreadable the way a single whole-file CRC failure effectively can.


What Changes Going From a Bare LZO File to a Gzip Tarball

  • Gain — near-universal tool support: gzip and .tar.gz are recognized by default on virtually every Linux and macOS system, and by 7-Zip on Windows, without installing anything extra.
  • Gain — the ability to hold more than one file: tar's own structure means additional files can be bundled alongside the recovered one, something a bare .lzo was never built to do.
  • Lose — LZO's very fast decompression: DEFLATE's Huffman-coding stage adds real decoding work that LZO's design specifically avoids.
  • Gain — usually a smaller file: DEFLATE's entropy coding on top of LZ77 matching typically beats LZO's matching-only approach on the same data.
  • Lose — LZO's very light CPU and memory demands: DEFLATE is heavier to run, which matters on the constrained embedded hardware LZO is often chosen for in the first place.
  • Lose — nothing about the actual file bytes: after full decompression and rebuilding, the recovered content is identical; only the compression method and container around it changed.

Where Gzip Ships Preinstalled and Where LZO Does Not

Gzip and tar are bundled by default into essentially every Linux distribution and into macOS's command line, and 7-Zip opens .tar.gz archives on Windows without any plugin. Lzop, by comparison, is typically a separate package that has to be installed explicitly — it isn't preinstalled nearly as widely, and mainstream desktop tools like 7-Zip and WinRAR generally don't include native LZO decompression at all, since LZO is used almost exclusively in Linux, Unix, and embedded contexts rather than general desktop file sharing.

That gap is the practical reason a conversion from LZO to tar.gz has real value. Files compressed with LZO commonly originate from places built around its speed advantage specifically — the Linux kernel's zram compressed-RAM subsystem, SquashFS since kernel 2.6.34, Btrfs (which lists LZO alongside zlib and zstd as one of its three supported compression algorithms), and embedded router firmware such as OpenWrt images. None of those contexts guarantee the receiving machine has lzop installed, while a .tar.gz opens with tools that are already standard almost everywhere.

Gzip's own license is worth noting alongside that compatibility gap: the format and the reference zlib/gzip implementations are free and patent-unencumbered, with no copyleft obligations attached. LZO and lzop, by contrast, are released under the GNU General Public License, version 2 or later — a real, documented factor for proprietary embedded-firmware projects weighing LZO against a more permissively licensed fast compressor, since GPL code carries redistribution requirements the other doesn't.


Real Problems That Show Up Converting an LZO File to Gzip

A recurring, documented complaint is a .lzo file downloaded from a Linux or router source refusing to open in 7-Zip, WinRAR, or a generic desktop archiver — this isn't a broken file; those tools generally don't build in LZO support, since the format is used almost exclusively where lzop is already available. Installing lzop, or a tool built specifically around its library, resolves this rather than pointing to file damage that isn't actually there.

A second recurring source of confusion is treating a bare .lzo as if it should contain multiple files, then being surprised when only one file comes back out after decompression — a plain .lzo was only ever built to hold one file at a time; a directory of files needs to have already gone through tar first, producing .tar.lzo (or .tzo) instead.

A third pattern involves scripts and Makefiles in embedded-Linux build systems that hardcode a specific call to lzop as one fixed stage of an image-building pipeline — the underlying file content is easy to swap out, but changing which compressor a script expects at that stage typically means editing the script itself, since tar and related tools need to be told explicitly which decompressor to use rather than guessing it from the data alone.


LZO's Speed Focus Against Gzip's Everyday Compatibility

Feature Raw LZO (lzop) TAR.GZ (tar + gzip)
Core algorithm LZ-style matching only LZ77 matching plus Huffman coding
Files per archive One file only Any number, via tar
Decompression speed Very fast Fast, but slower than LZO
Typical compression ratio Lower Moderately higher
License GNU GPL v2 or later Free, patent-unencumbered, permissive
Default install on Linux/macOS Separate lzop package usually needed Bundled by default

Questions About Turning a Raw LZO File Into a Gzip Tarball

Is a plain .lzo file the same as a .tar.lzo file?
No. A bare .lzo holds one file compressed by itself; .tar.lzo (or .tzo) is a full tar archive of multiple files compressed afterward — the two aren't interchangeable, and trying to treat one as the other explains a lot of unexpected results.

Why does gzip usually make a smaller file than LZO?
Because gzip's DEFLATE algorithm adds a Huffman-coding stage on top of its LZ77 matching, while LZO's default method skips that stage entirely to keep decompression fast, at the cost of a somewhat larger output.

Do I need special software to open a .lzo file?
Usually, yes. Mainstream archivers like 7-Zip and WinRAR generally don't include native LZO decompression, so the lzop utility, or a tool built on its library, is typically required first.

Does converting to tar.gz change the file's actual content?
No. Once the original file is fully decompressed and rebuilt inside the gzip tarball, its bytes are identical — only the compression method and surrounding container changed.

Where does LZO actually get used if it compresses less than gzip?
In places where decompression speed matters more than size — the Linux kernel's zram subsystem, SquashFS, Btrfs, and embedded firmware images all document LZO as a selectable option specifically for that reason.