[Interest] QFile subclass that does HFS compression?

René J. V. Bertin rjvbertin at gmail.com
Wed Dec 19 13:14:04 CET 2018


Marian Beermann wrote:

> The easiest way is probably a QIODevice wrapper implementing the HFS
> compression.

> Although I'm honestly surprised someone designed an
> interface like this. "Neither smart nor good" might be a ML-friendly way
> of putting it.

What interface?

The compression stage is cumbersome and lacks an official API. That's still 
understandable for HFS+ where the feature was grafted on only (IIRC) in OS X 
10.6, much less so for APFS. Decompression is really fast though (and 
compression rates very useful) so the design itself must be good enough. Storing 
in the file ext. attributes seems like a clever thing to do too if as I suspect 
it means small files do not occupy an entire (and largely unused) block on disk 
in addition to the space taken by their directory entry.

I have a hunch Apple didn't implement transparent compression in their 
filesystems because they also sell hard disk space...

There are other critical comments one can make related to HFS compression, like 
it being used by Mail.app regardless of whether the filesystem in use supports 
it.




More information about the Interest mailing list