Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing interaction with LZNT1-compressed files #85

Open
wigwoo1 opened this issue Feb 15, 2023 · 4 comments
Open

Confusing interaction with LZNT1-compressed files #85

wigwoo1 opened this issue Feb 15, 2023 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@wigwoo1
Copy link

wigwoo1 commented Feb 15, 2023

I've been using this software for a few years and one thing I've noticed is that decompressing has never worked. I always have to instead go to the properties of my drive and uncheck the "Compress this disk to save space" in order to decompress

@Freaky
Copy link
Owner

Freaky commented Feb 16, 2023

The "Compress this disk" checkbox - and its file and folder counterparts - are the old NTFS LZNT1 compression system, which is completely separate from the WoF compression system Compactor uses. If you have that set, then decompressing in Compactor will just be recompressing your files with LZNT1.

If that's the case I'd guess you're determining that "decompressing doesn't work" by observing that Compactor continues to report space savings - but that will be a result of LZNT1, not Compactor. You'll probably see the compression reduce somewhat because it's a less effective system. If you're seeing no change at all that would be unusual.

@wigwoo1
Copy link
Author

wigwoo1 commented Feb 17, 2023 via email

@Freaky
Copy link
Owner

Freaky commented Feb 17, 2023

But if I hit decompress, I don't end up losing any space and nothing gets decompressed

Ah, right, I don't actually do a second GetCompressedFileSizeW call on the decompress path, I just assume it decompresses to the full size:

fi.physical_size = fi.logical_size;

I do have a check for LZNT1 compression to mark them as incompressible, but it's helpfully skipped if the file's compressed size is less than the logical size. And in reality the correct thing to do would actually be to mark it as compressible, because Compactor can't decompress it, but it might be able to compress it more effectively.

Instead I'm forced to decompress the disk using Windows which takes well over 24 hours and then I can finally compress it with Compactor

I'm currently in the middle of a rewrite, with a new GUI and a new multithreaded backend - shouldn't be too much longer. I'll make sure I test this so it actually works properly.

@Freaky Freaky added the bug Something isn't working label Feb 17, 2023
@Freaky Freaky added this to the v0.11.0 milestone Feb 17, 2023
@Freaky Freaky self-assigned this Feb 17, 2023
@Freaky Freaky changed the title Decompressing doesn't work Confusing interaction with LZNT1-compressed files Feb 17, 2023
@wigwoo1
Copy link
Author

wigwoo1 commented Feb 18, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants