[Interest] QFile subclass that does HFS compression?

Thiago Macieira thiago.macieira at intel.com
Wed Dec 19 19:31:11 CET 2018

On Wednesday, 19 December 2018 02:06:08 PST René J. V. Bertin wrote:
> Thiago Macieira wrote:
> > where that is supported. Just get the file descriptor from QFile, do the
> > ioctl/fcntl/whatever that turns the feature on and write the correct byte
> > stream.
> You realise that you're basically saying not to use QFile at all in this
> application (there are cheaper ways to obtain a file descriptor).

No. All you need to do is that fcntl to turn the feature on. Everything else 
is still QFile. The only difference is that you write compressed.

> >> The question is more how feasible it is to integrate a compression engine
> >> of the type I outlined above (chunked zip) into QFile.
> > 
> > I don't want it.
> My question was about technical feasibility.

It's not, at least not without looking at any assumptions that might break. 
Writing 200 bytes that causes the file size to be 1000 could break internal 
QIODevice positioning and size caching.

So, no, I don't want to investigate this. Transparent compression is fine. 
That feature you're describing is not.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Interest mailing list