Compression
21 operations. Call any of them with cyberchef_bake, or pre-load them
with CYBERCHEF_TOOL_SURFACE=all.
Bzip2 Compress
Section titled “Bzip2 Compress”Bzip2 is a compression library developed by Julian Seward (of GHC fame) that uses the Burrows-Wheeler algorithm. It only supports compressing single files and its compression is slow, however is more effective than Deflate (.gz & .zip).
- Tool name:
cyberchef_bzip2_compress - Input / output:
ArrayBuffer→ArrayBuffer
| Argument | Type | Default |
|---|---|---|
block_size_100s_of_kb |
number | 9 |
work_factor |
number | 30 |
Bzip2 Decompress
Section titled “Bzip2 Decompress”Decompresses data using the Bzip2 algorithm.
- Tool name:
cyberchef_bzip2_decompress - Input / output:
ArrayBuffer→ArrayBuffer
| Argument | Type | Default |
|---|---|---|
use_low_memory_slower_decompression_algorithm |
boolean | false |
Gunzip
Section titled “Gunzip”Decompresses data which has been compressed using the deflate algorithm with gzip headers.
- Tool name:
cyberchef_gunzip - Input / output:
ArrayBuffer→ArrayBuffer - Arguments: none
Compresses data using the deflate algorithm with gzip headers.
- Tool name:
cyberchef_gzip - Input / output:
ArrayBuffer→ArrayBuffer
| Argument | Type | Default |
|---|---|---|
compression_type |
option | Dynamic Huffman Coding |
filename_optional |
string | — |
comment_optional |
string | — |
include_file_checksum |
boolean | false |
LZ4 Compress
Section titled “LZ4 Compress”LZ4 is a lossless data compression algorithm that is focused on compression and decompression speed. It belongs to the LZ77 family of byte-oriented compression schemes.
- Tool name:
cyberchef_lz4_compress - Input / output:
ArrayBuffer→ArrayBuffer - Arguments: none
LZ4 Decompress
Section titled “LZ4 Decompress”LZ4 is a lossless data compression algorithm that is focused on compression and decompression speed. It belongs to the LZ77 family of byte-oriented compression schemes.
- Tool name:
cyberchef_lz4_decompress - Input / output:
ArrayBuffer→ArrayBuffer - Arguments: none
LZMA Compress
Section titled “LZMA Compress”Compresses data using the Lempel–Ziv–Markov chain algorithm. Compression mode determines the speed and effectiveness of the compression: 1 is fastest and less effective, 9 is slowest and most effective
- Tool name:
cyberchef_lzma_compress - Input / output:
ArrayBuffer→ArrayBuffer
| Argument | Type | Default |
|---|---|---|
compression_mode |
option | 7 |
LZMA Decompress
Section titled “LZMA Decompress”Decompresses data using the Lempel-Ziv-Markov chain Algorithm.
- Tool name:
cyberchef_lzma_decompress - Input / output:
ArrayBuffer→ArrayBuffer - Arguments: none
LZNT1 Decompress
Section titled “LZNT1 Decompress”Decompresses data using the LZNT1 algorithm.Similar to the Windows API RtlDecompressBuffer.
- Tool name:
cyberchef_lznt1_decompress - Input / output:
byteArray→byteArray - Arguments: none
LZString Compress
Section titled “LZString Compress”Compress the input with lz-string.
- Tool name:
cyberchef_lzstring_compress - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
compression_format |
option | default |
LZString Decompress
Section titled “LZString Decompress”Decompresses data that was compressed with lz-string.
- Tool name:
cyberchef_lzstring_decompress - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
compression_format |
option | default |
Raw Deflate
Section titled “Raw Deflate”Compresses data using the deflate algorithm with no headers.
- Tool name:
cyberchef_raw_deflate - Input / output:
ArrayBuffer→ArrayBuffer
| Argument | Type | Default |
|---|---|---|
compression_type |
option | Dynamic Huffman Coding |
Raw Inflate
Section titled “Raw Inflate”Decompresses data which has been compressed using the deflate algorithm with no headers.
- Tool name:
cyberchef_raw_inflate - Input / output:
ArrayBuffer→ArrayBuffer
| Argument | Type | Default |
|---|---|---|
start_index |
number | 0 |
initial_output_buffer_size |
number | 0 |
buffer_expansion_type |
option | Adaptive |
resize_buffer_after_decompression |
boolean | false |
verify_result |
boolean | false |
Packs the input into a tarball.No support for multiple files at this time.
- Tool name:
cyberchef_tar - Input / output:
ArrayBuffer→File
| Argument | Type | Default |
|---|---|---|
filename |
string | file.txt |
Unpacks a tarball and displays it per file.
- Tool name:
cyberchef_untar - Input / output:
ArrayBuffer→html - Arguments: none
Decompresses data using the PKZIP algorithm and displays it per file, with support for passwords.
- Tool name:
cyberchef_unzip - Input / output:
ArrayBuffer→html
| Argument | Type | Default |
|---|---|---|
password |
binaryString | — |
verify_result |
boolean | false |
XPRESS Decompress
Section titled “XPRESS Decompress”Decompresses data using the XPRESS plain LZ77 algorithm (MS-XCA section 2.1).Similar to the Windows API RtlDecompressBuffer with COMPRESSION_FORMAT_XPRESS.
- Tool name:
cyberchef_xpress_decompress - Input / output:
byteArray→byteArray - Arguments: none
XPRESS LZ77+Huffman Decompress
Section titled “XPRESS LZ77+Huffman Decompress”Decompresses data using the XPRESS LZ77+Huffman algorithm (MS-XCA section 2.2).The uncompressed size must be known in advance, as it is from the WOF chunk table or WIM header, so it is taken as an argument.
- Tool name:
cyberchef_xpress_lz77_huffman_decompress - Input / output:
byteArray→byteArray
| Argument | Type | Default |
|---|---|---|
decompressed_size |
number | 4096 |
Compresses data using the PKZIP algorithm with the given filename.No support for multiple files at this time.
- Tool name:
cyberchef_zip - Input / output:
ArrayBuffer→File
| Argument | Type | Default |
|---|---|---|
filename |
string | file.txt |
comment |
string | — |
password |
binaryString | — |
compression_method |
option | Deflate |
operating_system |
option | MSDOS |
compression_type |
option | Dynamic Huffman Coding |
Zlib Deflate
Section titled “Zlib Deflate”Compresses data using the deflate algorithm adding zlib headers.
- Tool name:
cyberchef_zlib_deflate - Input / output:
ArrayBuffer→ArrayBuffer
| Argument | Type | Default |
|---|---|---|
compression_type |
option | Dynamic Huffman Coding |
Zlib Inflate
Section titled “Zlib Inflate”Decompresses data which has been compressed using the deflate algorithm with zlib headers.
- Tool name:
cyberchef_zlib_inflate - Input / output:
ArrayBuffer→ArrayBuffer
| Argument | Type | Default |
|---|---|---|
start_index |
number | 0 |
initial_output_buffer_size |
number | 0 |
buffer_expansion_type |
option | Adaptive |
resize_buffer_after_decompression |
boolean | false |
verify_result |
boolean | false |