[Interest] QFile subclass that does HFS compression?
Thiago Macieira
thiago.macieira at intel.com
Thu Dec 20 00:57:08 CET 2018
On Wednesday, 19 December 2018 14:00:50 PST René J. V. Bertin wrote:
> Thiago Macieira wrote:
> > Transparent compression is fine.
>
> But that's only because there is also transparent decompression, otherwise
> you'd be in exactly the same boat.
Correct.
> Ultimately I don't think it matters where the compression takes place, in
> filesystem code or in userland code. As long as the fact that compression
> takes place is completely hidden from code that needs to work the same way
> when there is no compression.
>
> I'm going to try to let this rest (until I learn of a way where you don't
> need to keep the entire compressed resource fork in memory as long as the
> file is open for writing).
Almost all the compression libraries support streaming mode. Some will have a
pull mechanism, where it will ask you for a number of bytes; others will have
a way for you to detect the next block's size so it can be decoded. Usually,
memory usage in the decoder is not that big, but it might rise to a megabyte
or two for large, well-compressed files.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list