3 ms·
It seems to mostly work and get out of the way, but there's one thing I'd really like them to add. There's a way to explicitly compress files if you want. You
by viraptor 4y ago
It seems to mostly work and get out of the way, but there's one thing I'd really like them to add.
There's a way to explicitly compress files if you want. You can get the "afsctool" and run it on the directory with your sources for example and gain some space back. Unfortunately, this gets applied per-file only. There's no way to mark a directory to always compress everything in it. I don't think you can do it per-volume either.
It would be great if those options got exposed to the user. I'm not going to hold any breath though, it may be one of those "Apple knows better" issues.
- abofh 4y agoIt would be hard to do directory wide - how would you handle a hard link for example?
- viraptor 4y agoChoose one behaviour and document it? Hard links are such a rare exception in any system that either ignoring them or compressing regardless would be fine. Or check what others have done. You can do "btrfs property set /path compress zstd", so someone's solved it before.
- eviks 4y agoCompress it since it's just a regular file, doesn't matter that it exists elsewhere Or add an config option Why is that hard?
- saagarjha 4y agoTransparent file compression is nothing new; if anything it’s filesystem agnostic assuming what you’re running on supports resource forks. In fact in many ways it was really designed for HFS+; many of the more esoteric ways to compress files don’t make sense on APFS.
- viraptor 4y agoHFS wasn't great about the compression. You got 0-size files with some extra attributes, which is not always usable. APFS is actually an improvement here - mainly because apps do not need to know about resource forks.
- saagarjha 4y agoIt's meant to be transparent to applications that aren't aware of how it works; the mechanism hasn't changed (you can store data in either the xattr itself or the resource fork).