LZMA-JS Advanced Demo

This page demonstrates LZMA-JS: an implementation of the LZMA compression algorithm in JavaScript. LZMA-JS will use web workers, if available, which allows the browser to remain interactive even while compressing/decompressing large amounts of data. It will also gracefully degrade on older browsers that do not support web workers. (It even works on IE6!) You can find a simpler demo here.

Compressing: Enter any content into the left text box, and click "Compress" to compress it. When finished, the right text box will display the hexadecimal representation of the compressed content of the left text box (after encoding it in UTF-8). Use the drop down box to choose from fastest (Level 1) to best (Level 9) compression.

Decompressing: Enter whitespace-separated hexadecimal bytes in the right text box corresponding to compressed output of the LZMA algorithm. Click the "Decompress" button to decompress the data, and the original text will be shown back in the left text box (decoded from UTF-8). However, it the original content is binary data, it will instead display the data as a comma separated list of bytes.

On UNIX machines, you can generate input for the right text box yourself using commands like this:

$ echo "Hello, world." | lzma | hexdump -C | cut -c9-60

This JavaScript application runs entirely within your web browser.