this post was submitted on 17 May 2026
41 points (93.6% liked)

Linux

65314 readers
430 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS
 

Any way to compress game files on linux? I know that all games vary, content vary and so on, but is there any things i can look out for in like an average steam game which I can compress, and the game can still run fine, tools or programs or anything?

all 25 comments
sorted by: hot top controversial new old
[–] Robin@lemmy.world 49 points 1 day ago (1 children)

The Btrfs and ZFS filesystems support compression.

[–] Quazatron@lemmy.world 14 points 1 day ago (2 children)

This is how I do it. I put my Steam directory in an external BTRFS drive with compression turned on. Works great, and allows me to take my library between computers.

[–] BluescreenOfDeath@lemmy.world 2 points 7 hours ago

You'd get even more savings using something like bees because it does block level deduplication.

What bees does is build a hash table of every block on your ssd, and compares them. If it finds any matches, it will delete one and just place a pointer to the other where the deleted one was, the pointer being much smaller than the duplicate data block.

Functionally, any installed games with shared assets get space savings. It's particularly helpful on with Steam games because of all the proton prefixes. Lots of opportunities for finding duplicate data blocks.

If you use snapshots, it can save even more.

[–] wltr@discuss.tchncs.de 3 points 15 hours ago (1 children)

Have you measured the difference? Is it huge? I’m curious to understand what the trade-offs are and how many more games can you store on the same drive.

[–] Quazatron@lemmy.world 3 points 14 hours ago (1 children)

My main goals are efficient space usage and portability, so I've never measured anything. I'll get some stats for you.

[–] wltr@discuss.tchncs.de 2 points 14 hours ago

I would appreciate even not very accurate comparison just to get the idea. A brief search meanwhile showed me it’s a great idea actually. But having someone who uses that to comment would be great too. Thanks.

[–] SolarPunker@slrpnk.net 1 points 13 hours ago

This is another reason on why dodi / fitgirl repacks are so popular, they are masters on this.

[–] thingsiplay@lemmy.ml 15 points 1 day ago (3 children)

If you make any changes to the game files in Steam, including compression, then Steam will update the files and redownload them. And for online games, you could even get a ban if an Anticheat system thinks you try to cheat because the files are tempered (changed).

However there is a transparent compression available on filesystem level. Meaning files are saved compressed and look and work like uncompressed files. Something similar what Windows has I believe. EXT4 does not have transparent compression, but I often read Btrfs and ZFS do. I have no experience with that, so cannot assist. But at least you should be able to search for this now. Have in mind that compressed filesystem would be slower.

[–] Ooops@feddit.org 18 points 1 day ago* (last edited 1 day ago)

Have in mind that compressed filesystem would be slower.

Often the opposite is true, depending on case. Compressed files load faster, so if you have the cpu power to spare (which you usually have in games while loading) and loading speed is the bottle-neck then compression speeds things up, often considerably.

And even in the age of ssds processing data and moving it through ram is much faster than the disk, so even for writing some amount of transparent compression is possible without affecting speeds.

[–] Robin@lemmy.world 17 points 1 day ago (2 children)

If you have a fast CPU adding compression can actually improve performance. https://www.phoronix.com/review/btrfs-zstd-compress

[–] adarza@lemmy.ca 3 points 17 hours ago

with fast nvme not that much.. not like the 'olden days' of msdos and stacker where it was actually noticeable on some systems.

[–] thingsiplay@lemmy.ml 7 points 1 day ago

Hmm, looks like it can be slower on write, but faster on read depending on the CPU and drive probably. Games mostly read files, so this might even improve performance.

[–] Inui@hexbear.net 4 points 23 hours ago

I would suggest Btrfs for regular use. ZFS is better for server use and redundancy in systems with critical data you don't want to lose. It also uses all your ram as cache and will give it back to you if you need it, but still has a harder performance hit on things you run. Be overkill for just wanting to save a little space. A lot of new gaming distros like Bazzite suggest using Btrfs on all secondary drives.

[–] M33@piefed.world 13 points 1 day ago (2 children)

Aren’t most games assets files already compressed?

[–] Obin@feddit.org 6 points 1 day ago* (last edited 1 day ago) (1 children)

With compress=zstd ZFS reports a 1.30 compression ratio on my Steam dataset, compressing it from ~1.2TB (reported by the file manager) down to 904GB (reported by zfs list -o name,usedds). Pretty good I think.

Obviously it depends on the games. AAA crap will probably add tens/hundreds of GBs of pre-compressed asset blobs, while indie and older games will often have more loose file structures with config files, scripts, runtimes etc. that all compress extremely well. And with older games, even when compressed the algorithms are often far from ideal and zstd can still get a few more percent out of them.

[–] M33@piefed.world 2 points 23 hours ago (1 children)

Btrfs here, with zsdt:3, on my game data the compression ratio is a bit worse than that, but it does save some space to my surprise.

[–] adarza@lemmy.ca 1 points 17 hours ago

with default btrfs zstd compression here, i save a whole 2 percent on game install directories..but 48 percent elsewhere (trixie kde, ~ 2800 dpkg + flatpaks. 'documents' are on a diff filesystem)

[–] daggermoon@piefed.world 2 points 17 hours ago
[–] MonkderVierte@lemmy.zip 8 points 1 day ago (1 children)

Btrfs disk with periodical dedup.

[–] chgxvjh@hexbear.net 2 points 20 hours ago (1 children)

Does dedup no longer shred the file system?

[–] MonkderVierte@lemmy.zip 2 points 20 hours ago* (last edited 20 minutes ago)

Never did with my weekly cronjob. But i have ext4 on the system partition, btrfs on the 1.5 TB game partition.

Edit: system partition, boot partition is fat32.

[–] KianaTabion@lemmy.today 4 points 21 hours ago

As noted by others, I'm pretty sure many different solutions exist. But, FWIW, I've had good results with DwarFS.

[–] whatiswrongwithyou@lemmy.ml 2 points 1 day ago

There are about a million ways to do what you’re asking. Which one is the right choice depends on the particular hardware you’re using and what you want to accomplish.