IridiumIO / CompactGUI

Transparently compress active games and programs using Windows 10/11 APIs
GNU General Public License v3.0
4.72k stars 224 forks source link

Files/folders lose compression after being copied or moved #340

Closed Cee123 closed 4 months ago

Cee123 commented 1 year ago

One thing I've noticed is that if you compress a folder on one drive or PC and then try and transfer that folder to another drive or PC (also NTFS and running Windows 11), it loses compression. The file size will be the full size despite being compressed at its original location. And when you try to compress it on the other drive or PC it will say that it's already compressed when actually it's the full size because it lost compression. So the workaround is to copy the full size folder to the other drive or PC and compress it at both locations separately. Which is kind of annoying. Moved/copied folders/files do not retain compression. I think this might be a bug so I'll report it.

ShinChaosBahamut commented 1 year ago

Not a bug, that's just how the compression works. If the files get altered, and moving them is a form of altering them, the compression gets undone.

The bit about CompactGUI still saying it's compressed though, I think THAT is a bug.

Cee123 commented 1 year ago

Not a bug, that's just how the compression works. If the files get altered, and moving them is a form of altering them, the compression gets undone.

The bit about CompactGUI still saying it's compressed though, I think THAT is a bug.

What about if the other drive and PC are running Windows 11 on an NTFS formatted drive? Is that supposed to happen?

Yeah that's what I thought too. Decompressed the files, but upon trying to compress them again says they're already compressed. Really strange.

Iridium-IO commented 1 year ago

CompactGUI telling you it's already compressed is a bug, not sure why it's doing that. Quite possibly it's Windows not removing the "compressed" flag from the folder when it's moved.

The folder being uncompressed when moved is not a bug with CompactGUI itself though. It's just how Windows works - though a more sensible approach from Microsoft would be to leave it compressed and just re-link the new location in the MFT. If you're moving it to a new drive though there's no getting around that.

Cee123 commented 1 year ago

CompactGUI telling you it's already compressed is a bug, not sure why it's doing that. Quite possibly it's Windows not removing the "compressed" flag from the folder when it's moved.

That's what I thought. So there's a flag that tells the system whether the files have been compressed? Oh I see. That's interesting, pretty cool. Must have something to do with that.

The folder being uncompressed when moved is not a bug with CompactGUI itself though. It's just how Windows works - though a more sensible approach from Microsoft would be to leave it compressed and just re-link the new location in the MFT. If you're moving it to a new drive though there's no getting around that.

Ohh ok, I didn't realise that was how it worked within Windows. That's interesting. Yeah I agree that would be the better way of doing it. Not sure why they chose to do it that way.