Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find a lossless compression algorithm, which produces headerless outputs?

Does anyone of you know a lossless compression algorithm, which produces headerless outputs? For example do not store the huffman tree used to compress it? I do not speak about hard coded huffman trees, but I like to know if there is any algorithm that can compress and decompress input without storing some metadata in its output. Or is this even theoretically impossible?

like image 384
bot47 Avatar asked Feb 18 '09 15:02

bot47


People also ask

Which algorithm is lossless data compression algorithm?

Its highly efficient DCT-based compression algorithm was largely responsible for the wide proliferation of digital images and digital photos. Lempel–Ziv–Welch (LZW) is a lossless compression algorithm developed in 1984.

What is the best lossless compression algorithm?

The most successful compressors are XM and GeCo. For eukaryotes XM is slightly better in compression ratio, though for sequences larger than 100 MB its computational requirements are impractical.

What is an example of a lossless compression?

Examples of lossless compression include GZIP, Brotli, WebP, and PNG, Lossy compression, on the other hand, uses inexact approximations by discarding some data from the original file, making it an irreversible compression method.

Where would lossless compression be used?

Why lossless compression? Lossless compression algorithms are needed in cases where we want the reconstructed file output to be identical to the original output. Lossless compression is generally used for text compression: data such as database records, spreadsheets, and word processing files.


2 Answers

Of course it is posible. Among others, the LZ family of compressors don't need to output anything apart from the compressed data itself, as the dictionary is built on-line as compression (or decompression) progress. You have a lot of reference implementations for those LZ-type algorithms. For example, LZMA, component of 7zip.

like image 51
Diego Sevilla Avatar answered Sep 21 '22 12:09

Diego Sevilla


Adaptive Huffman coding does exactly that. More generally, the term adaptive coding is used to describe entropy codes with this property. Some dictionary codes have this property too, e.g. run-length encoding (RLE) and Lempel-Ziv-Welch (LZW).

like image 33
Zach Scrivena Avatar answered Sep 18 '22 12:09

Zach Scrivena