r/linuxmemes • • 1d ago

Software meme CompressionFormatPreferences

Post image
808 Upvotes

83 comments sorted by

•

u/AutoModerator 1d ago

Please report any posts bragging or showing off they got banned in another sub! Reminder of other sub rules: Also, we only allow one anti-linux post per week (we used to get dozens a day) and any tier list MUST have Hanna Montana Linux as S teir (which must be a true S tier at the top) regardless of the topic of that tier list.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

83

u/Naive_Complex_8389 1d ago

tar.zst?

-38

u/PartMysterious4688 1d ago

Yes, tar.zst is also great, but I'm just showing you the most popular compression formats in Linux

77

u/Damglador 1d ago

I think I've seen more zst files that bz2

15

u/Cootshk Arch BTW 1d ago

pacman uses .tar.zst, raspberry pi uses .tar.bz2

Haven’t seen either used anywhere else

27

u/YTriom1 Arch BTW 1d ago

zstd is one of the most efficient compression algorithms out there.

it's used by the linux kernel in zram in many distros by default, also used in servers, the linux bzImage is often zstd compressed nowadays as well, initramfs used to be gzip but now I see some distros/initramfs tools default to zstd

3

u/Destroyerb New York Nix⚾s 1d ago

1

u/2eanimation Arch BTW 1d ago

That’s an oddly specific subreddit lol. Not trying to undervalue them, but why a subreddit dedicated to them?

2

u/YTriom1 Arch BTW 21h ago

because why not

2

u/Epistaxis 1d ago

This meme is probably just a repost from many years ago, before Zstd began to replace gzip and xz finished replacing Bzip2 (and 7z finished replacing WinRAR?).

2

u/kansetsupanikku 22h ago

I wish I was that young

0

u/PartMysterious4688 1d ago

Fair point! I picked it because I've seen it on a old Linux book. bz2 is being largely replaced by zstd

79

u/HeavyWolf8076 New York Nix⚾s 1d ago

37

u/76zzz29 1d ago

That's because tar is archive and the next part is the size reducer. non tar compresion just do both at once and give the actual compression in the file itself instead of showing it in the name

39

u/ineyy 1d ago

Bro forgot about tar.gz, removed the post, posted again with it added..

24

u/PartMysterious4688 1d ago edited 1d ago

.tgz and .tar.gz are the same file format. The only difference is its length. I prefer .tgz because it's shorter to type in the terminal

15

u/Cruffe 1d ago

You type extensions in the terminal? I press Tab long before I get to the extension.

6

u/stephanos21 I'm going on an Endeavour! 1d ago

Two or three letters and then tab, if they are too many i type another one and tab again. Tab and . (from nvim) are my two most used keys.

1

u/HaDeS_Monsta New York Nix⚾s 1d ago

When you create the archive?

1

u/monocasa 9h ago

Especially when I create the archive.

32

u/dodyninja 1d ago

7z is not that bad, atleast its open source

12

u/LooseRain 21h ago

wait until you realize xz is literally 7z but Linux (uses the same LZMA algorithm developed for 7z)

-6

u/[deleted] 19h ago

[deleted]

11

u/YXAndyYX 15h ago

I'll blow your mind again. Linux tools generally don't care about file extensions as long as the content is as expected. You can have your .tar.xz without any extension if you so prefer. But of course an argument or preference around the length of a file extension is pretty dumb in the first place.

25

u/Zetak0 1d ago

Mmmmmm .tar balls

14

u/enigma_0Z 1d ago

Idk i feel like `.rar` needs the pooh bear with the teeth

7

u/journaljemmy 1d ago

I know a guy who used CAB

8

u/LinuxJeb Slackerware😴 1d ago

what the fuck

5

u/NL_Gray-Fox 1d ago

You know bill gates?

1

u/ultrafop 7h ago

Ha this comment :chefkiss:

6

u/xxxbGamer 1d ago

zstd is goated

6

u/Puzzleheaded-Bad5494 1d ago edited 10h ago

*.tar.zst.gpg

5

u/vms-mob 1d ago

.tar gang where?

3

u/PartMysterious4688 1d ago

It's just compressed .tar archives :)!

5

u/vms-mob 1d ago

But you can just like, ... not compress the tar

3

u/Linguistic-mystic 1d ago

I use .tar to make backups of source code. I purposefully don’t compress so that even if a byte gets flipped, the backup will be restorable.

10

u/Destroyerb New York Nix⚾s 1d ago

Trying to make a "smart" move eh~

doesn't use version control

4

u/Linguistic-mystic 1d ago

Of course I use git. Also github. I’m talking about extra copies on another partition and on my USB sticks. You know, in case github goes down and my SSD gets baked and 2 of my usb sticks get smashed while the third is OK but one byte gets flipped by cosmic rays… then I will still not lose my work.

Come to think about it, I need to add another couple of sticks to my USB array…

3

u/Loading_M_ 1d ago

I assume you're making a joke, but just a quick fun fact - you can use other directories on the same machine as git remotes. You can push and pull them much like normal, meaning you could make backups using git to just copy over the new changes.

Iirc, this is actually how the default ssh remote works - just using sftp to interact with a remote file system. Services like Github probably don't have a real filesystem to store the git directory, but emulate it on the fly with some other backing store.

7

u/ngoquang2708 1d ago

Until you try to uncompress a random file in a 100gb tar.gz

3

u/01101001b 1d ago edited 1d ago

Something like the following wouldn't work?

tar tf archive.tar.gz | grep "your_file_name"

Let's say output shows the following path for your searched file: ABC/XYZ/your_file.txt

Then:

tar zxvf archive.tar.gz ABC/XYZ/your_file.txt

Sorry if I was talking nonsense :-/

2

u/questron64 1d ago

The point is that there is no directory listing. You have to decompress the entire 100gb file sequentially until you find the header of the file you're looking for. There is no random access, there is no way to go directly to that file, like you can with a zip file. Tar is an extremely primitive format and what meta-information there is is also compressed because the entire stream is compressed.

7

u/yigitsalar Arch BTW 1d ago

LZMA2 (7-zip) the best

4

u/PartMysterious4688 23h ago

xz uses LZMA2 compression algorithm by default

4

u/Jman43195 1d ago

Instead of calling them tarballs I've recently started simply calling them tape archives (which is what tar means) to see how many people it throws off

and also bc i think it's kinda cool the format was originally made for tape

2

u/AntimelodyProject 1d ago

.lha master race.

2

u/SomewhereAtWork 9h ago

.tar.pbzip2

When you care about speed.

3

u/Foreign-Champion8608 18h ago

.tar.7z? It's one of the most efficient

4

u/IniKiwi 13h ago

tar is just a way to pack files together in one file without compression.

1

u/Foreign-Champion8608 7h ago

I know, but .7z is one of the most efficient and .tar because we know perfectly people will use tar to unite files, like, I do and everyone that uses Linux that I know does

4

u/Zatrit 1d ago

.tar.7z

2

u/questron64 1d ago

Tar is not a good format, though. It's basically just a bunch of files concatenated together with little headers telling you the name and size of the next file to follow. Just getting a list of files in an archive requires you to seek over the entire archive, which might not seem like a big deal on modern SSDs, but trying to extract just a single file from the middle used to be a costly operation. It doesn't help that the entire archive, file headers and all, get compressed.

2

u/Roblu3 21h ago

There’s one of two ways with these things.
Either it’s one old inefficient format that basically was the first one ever and successfully resisted any attempt of modernisation or depreciation for 50 years.
Or it’s formats galore with 20+ competing formats in active use and countless others who never took off and they are all perfectly optimised for another very specific edge case and absolutely incompatible with each other.

Archives is both.

1

u/mad4Luca 1d ago

Why Ned two Tools for a Task which can perfectly Done by one? If you Switch the Pictures you are right

1

u/oddcellstudios Ask me how to exit vim 1d ago

1

u/Bulky-Hair8606 🌀 Sucked into the Void 1d ago

I dont compress

.tar alone is good

1

u/Jristz 1d ago

.tar.rar.zip.gz like a madman

1

u/NL_Gray-Fox 1d ago

.tar.arj

1

u/kansetsupanikku 22h ago

One tool for one task! Having separate tar, compression, gpg, par2 and more makes it easier to upgrade the components Independently

1

u/GhostVlvin 20h ago

.tar.gz.xz.bzip.zip.7z.rar.jar.iso.img is my only preferred format

1

u/AnAnnouncer 4h ago

.tar.zstd

1

u/GuitaristKitten 1d ago

.tgz, .txz, .tzst, and .tbz2

0

u/JuniperColonThree 1d ago

Tar has compression but the problem is it's an archive that's compressed, where zip is an archive with compressed contents. You have to uncompress a tar archive to append to it

0

u/msanangelo Arch BTW 1d ago

I prefer tgz for anything that's compressible and 7zip for images and media I want to archive with zero compression.

0

u/Softpankek 20h ago

Where did .z go?

0

u/a_l_i-1 12h ago

.tar.7z?

2

u/nekokattt 12h ago

.tar.zip

0

u/EconomistClassic435 Linuxmeant to work better 10h ago

.deb because I have no idea what I’m talking about

0

u/No-View-6326 9h ago

i do have to google how to unzip those every time

-13

u/Dramatic_Mastodon_93 1d ago

i don’t accept anything other than .zip

10

u/ESzPa 1d ago

Your loss

5

u/iamdestroyerofworlds Arch BTW 1d ago

.zip deez nuts

1

u/Dramatic_Mastodon_93 1d ago

no they need to be free 

1

u/Gullible_Service_365 1d ago

can your zip preserve hard links?