-
Notifications
You must be signed in to change notification settings - Fork 57
Combined sparse and compression flags #40
Description
You asked this question:
Does the sparse flag needs to be set for sparse compressed files?
Now, I'll fully admit that I'm a dummy, but I only saw the flag for the sparse/compression/encryption in the $Data attribute. If that is the ONLY place that one should be looking to see if file is sparse or not, then I an answer your question accurately. However, everywhere that you have stuff as 0x4000 and 0x8000, I see the actual bytes as 00 80 (0x0080) for sparse and 01 00 (0x0100) for encryption, etc. So, if you understand what I'm talking about, then maybe you will find use in what I've dug up tonight:
The answer is yes. A sparse + compressed file shows up as 0x0180 (Both sparse and compression flags set).
In this case, the sparse file has 64kb allocated, but the disk usage is reduced to 4kb due to compression:
A non-sparse file that gets encrypted sticks with just 0x0040.
I can also confirm that a sparse file (0x0080) that is then set to encrypted shows up with $DATA attribute flag set to 0x00C0.
Filed as an issue because I don't know if this is useful or accurate. Good luck!
