Can unrar Extract Text Compressed Archives?
Yes, the standard unrar utility can extract archives
compressed with text compression algorithms. Historically, the RAR
format (specifically RAR 3.0) featured dedicated text compression based
on the PPMd algorithm, and the official unrar tool retains
full backward compatibility to decompress these files. However,
successful extraction depends on the specific variant of the
unrar software you are using and the version of the RAR
format used during creation.
How RAR Handles Text Compression
In RAR version 3.0, RARLAB introduced dedicated compression algorithms optimized for specific data types, including multimedia, audio, and plain text. For text, WinRAR and the RAR command-line utility used a variant of Dmitry Shkarin's PPMII (PPMd) algorithm. When a user compressed plain text files, the compressor automatically or manually engaged this mode to achieve significantly higher compression ratios than standard dictionary-based LZ algorithms.
Official unrar vs. unrar-free
Whether your system can extract these archives depends directly on
the unrar package installed:
- Official
unrar(RARLAB): Distributed as proprietary freeware (often packaged asunrarorunrar-nonfreein Linux repositories), this utility includes complete decompression code for all RAR algorithms. It fully supports legacy PPMd text compression, multimedia filters, and all iterations of the format from RAR 1.5 up to RAR 5.0+. - Open-Source Alternatives (
unrar-free): Some Linux distributions offerunrar-free, a tool built on older, reverse-engineered source code. This version often lacks support for RAR 3.x and 4.x features—including PPMd text compression—and will return an error when attempting to extract such archives.
To ensure text-compressed archives extract properly, verify that you
have the official RARLAB build installed by running unrar
in your terminal; the output should reference Alexander Roshal or
RARLAB.
Changes in the RAR5 Format
While older RAR 2.x and 3.x archives made heavy use of explicit text compression algorithms, RARLAB shifted strategies with the introduction of the RAR 5.0 format.
In RAR 5.0, dedicated algorithms like PPMd for text and specialized routines for audio were deprecated and removed. Instead, RAR 5 relies on an improved general-purpose LZ architecture with much larger dictionary sizes (up to several gigabytes). This modern approach matches or exceeds the compression efficiency of older text algorithms without requiring separate, compute-heavy decompression routines.
Even so, modern builds of the official unrar tool
continue to carry the legacy decoders, ensuring that older archives
containing PPMd text-compressed streams can still be extracted without
issue.