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?

    • Quazatron@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      7 hours ago

      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.

    • Obin@feddit.org
      link
      fedilink
      arrow-up
      3
      ·
      5 hours ago

      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.

  • thingsiplay@lemmy.ml
    link
    fedilink
    arrow-up
    13
    arrow-down
    2
    ·
    8 hours ago

    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.

    • Inui [comrade/them]@hexbear.net
      link
      fedilink
      English
      arrow-up
      3
      ·
      4 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.

    • Ooops@feddit.org
      link
      fedilink
      arrow-up
      12
      ·
      7 hours 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.

      • thingsiplay@lemmy.ml
        link
        fedilink
        arrow-up
        4
        ·
        7 hours 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.

  • whatiswrongwithyou@lemmy.ml
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    5 hours 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.