*Edit: I have figured out how to use BTRFS and enable what it calls “transparent file compression”, and I’m going to use that on most of my old storage devices. The only problem I’m having is that I want to use F2FS on my oldest storage device, as BTRFS takes up too much space on the device and I was told by multiple users that F2FS also supports transparent file compression, but I can’t get files to compress and I’m not getting any error messages to try and fix it. Based on what the documentation says, I’m supposed to do something like this:
sudo mkfs.f2fs -f -O extra_attr,inode_checksum,sb_checksum,compression /dev/mmcblk0p1
sudo mount -o compress_algorithm=zstd,compress_extension=* /dev/mmcblk0p1 '/home/j/mountpoint/128mb'
chattr -R +c '/home/j/mountpoint/128mb'
The device will mount like this but files aren’t compressing when added, nor are they compressed if using the last command after they’ve been moved.*
I’m rewriting the old portion for clarification:
In Windows, there’s a file/folder option called “Compress contents to save disk space”. What it does is it compresses the files, as the name suggests, but leaves them accessible as though they aren’t. This doesn’t really have much of a benefit on newer storage devices but on older storage devices, in addition to saving space, it allows files to potentially read faster.
As I have some old storage devices that I want to run games from, I think this will be a great option to have if I could find something similar for Linux. I tried looking online myself but search engines are terrible and I couldn’t find anything though them. So, I decided to post about this here, to see if anyone knows of anything I could try.


Not sure that’s relevant, but I’m playing around with Linux on some obsolete Windows tablets with cheap eMMC disks (one of which is broken, so I replaced it with a no name microSD card, plus USB drive), and I format my disks to f2fs, which theoretically should help with both keeping the disks for longer, and accessing the data faster.
I’ll have to test that out more later but I did format the sd card to f2fs and it did seem to write files very fast when I did a simple test. The only issue I’m seeing is that it has about 25% less space than it did when I had it formatted for ext4, is that normal for f2fs?
Make sure you’re actually filling the volume, and also keep in mind reporting may be different (with or without filesystem index metadata, etc)
Also, you can simply use regular file systems and compressed files, and then use a RAM drive (assuming you have enough RAM free) and access the files that way instead
I’m just going by what Linux Mint’s file manager says and it’s saying that the used space is about 40 MB with f2fs while it was about less than half of that when it was formatted to ext4.
What’s a RAM drive? I have 8 GB of RAM and I have ZRAM enabled, so I should have enough RAM for most of the files I’d consider using it for.
RAM drive is when you hold the entire file system in RAM, it’s used for stuff like Linux Live CD boot with no writable storage but you can use it for anything.
Is it read-only, or does it write the files at some point?
FYI digging through documentation reminded me of squashfs. It does what it sounds like. But it’s read only, so you would have to use an overlay FS to cache changes and then overwrite the whole squashfs volume at once to sync changes.
https://medium.com/@akashsainisaini37/how-overlayfs-and-squashfs-power-embedded-linux-storage-75273028ef20
Both are possible but read only is more common