Skip to content

Instantly share code, notes, and snippets.

@h3ssan
Created May 23, 2022 21:34
Show Gist options
  • Save h3ssan/581f1cd96b327576ae5b5fe1a4aeaaca to your computer and use it in GitHub Desktop.
Save h3ssan/581f1cd96b327576ae5b5fe1a4aeaaca to your computer and use it in GitHub Desktop.
Best compression algorithms in Linux

Recommended Compression by Extention

Extention compression
.burp .tar.xz
.cap | .pcap | .pcapng .tar.xz

Examples

In the following examples, I'll compress a directory named data to archive named compressed followed with its extention.

.tar.xz

tar cf - data | xz -9e - > compressed.tar.xz

.tar.gz

tar cf - data | gzip -9 - > compressed.tar.gz

.tar.bz2

tar cf - data | bzip2 -9 - > compressed.tar.bz2

.7z | 7zip

7z a -mx=9 compressed.7z data

.zip

zip -9 -r compressed.zip data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment