Compactor icon indicating copy to clipboard operation
Compactor copied to clipboard

Question: Will this tool cause games to use less GPU VRAM?

Open xSimone opened this issue 1 year ago • 10 comments

If the tool compresses games, does that mean the compressed data, I assume mostly being textures.. would that make it so VRAM is saved as well? Making GPUs with 8GB / 12GB become somewhat a little more futureproof?

xSimone avatar Nov 13 '24 13:11 xSimone

Not how that works, and trust me, you wouldn't want it to be the case even if it was possible.

Masamune3210 avatar Nov 13 '24 22:11 Masamune3210

It can speedup loading times given a good CPU, but data absolutely need to be decompressed in order to be of any use. This includes even JPEG images, you can't see the raw compressed image, it has to be decompressed in ram first (oversimplification)

Creative-Geek avatar Dec 25 '24 20:12 Creative-Geek

It can speedup loading times given a good CPU, but data absolutely need to be decompressed in order to be of any use. This includes even JPEG images, you can't see the raw compressed image, it has to be decompressed in ram first (oversimplification)

I see.

So what it does is it just unpacks the compressed object, then uses a better compression technology to make it smaller.

The target object however remains the same original size and so on when decompressed in RAM to be utilised in game, and thus this is why textures ingame don't change in quality?

All the tool actually does is just say "I can pack all this better than you" to the original game designers using Windows' own method?

That's actually awesome if so, I was unsure of using it myself on my main games because I was scared I'd see some artifacts in some textures, or screen dooring, etc.

xSimone avatar Dec 26 '24 02:12 xSimone

This tool does not do anything like that. All it does is call the functions already built into Windows to handle compressing and decompressing files. If the files are already compressed, compressing them again is going to do nothing at best and actively make things worse on average.

It doesn't unpack anything. It doesn't touch the files themselves at all. It can't magically make a game or program use a completely different format for its files than the one it was designed to use.

Masamune3210 avatar Dec 27 '24 09:12 Masamune3210

This tool does not do anything like that. All it does is call the functions already built into Windows to handle compressing and decompressing files. If the files are already compressed, compressing them again is going to do nothing at best and actively make things worse on average.

It doesn't unpack anything. It doesn't touch the files themselves at all. It can't magically make a game or program use a completely different format for its files than the one it was designed to use.

What the shit.. then how in the world does it make the game dir smaller in size? :f What is it doing?

xSimone avatar Dec 27 '24 09:12 xSimone

Compressing....the files. There are multiple layers between the raw 0's and 1's and what makes it onto the disk. What the person before was talking about and what you were confused about is file-level compression, where the data is packed into a file by the person who made the file, optionally, with some form of compression.

Compactor is one step removed from that, it compacts files at the filesystem level, meaning the data the person made is still there, its just written to the disk in a more compressed form and automatically decompressed by the system on the fly whenever it is read.

Masamune3210 avatar Dec 27 '24 09:12 Masamune3210

Compressing....the files. There are multiple layers between the raw 0's and 1's and what makes it onto the disk. What the person before was talking about and what you were confused about is file-level compression, where the data is packed into a file by the person who made the file, optionally, with some form of compression.

Compactor is one step removed from that, it compacts files at the filesystem level, meaning the data the person made is still there, its just written to the disk in a more compressed form and automatically decompressed by the system on the fly whenever it is read.

I think I understand now..

So my mistake in understanding is it's not turning a .zip into a .7, but instead taking the whole directory and just writing it to the disk in a more efficient way?

Kind of like the opposite how when you download a 10 GB file, but it isn't fully downloaded, it says the size on the disk is "10GB" when in actual fact it's much smaller?

Sorry this is just super interesting, it's almost tempting to just Compact the C drive for fun. LOL ;d

xSimone avatar Dec 29 '24 21:12 xSimone

We're getting there, but things are still a bit fuzzy it seems.

Yeah, its not making an archive out of the files (which is what zip and 7z are, file archives), but its basically encoding the data so that it fits in less space than if it was just written out to the disk as is in a way that can be completely reversed, something called lossless encoding.

That's close, but not quite right. The reason it shows up as 10GB but is smaller is because the system knows that the file will end up as 10 GB so it fakes it to the user, basically creating a ghost of the file. The size is set to 10 GB because it knows that is what it should be at the end, but the amount of space allocated on the disk is only as much data as has actually been written. This also comes into play with compression, so you can have a 5 GB file only have 3.4 GB allocated because the compression managed to squeeze the data into 3.4 GB of space on the disk instead of the 5 GB that it would normally take up.

Yeaaaaaah, I wouldn't touch C:\ unless you REALLY want to reinstall Windows.

Masamune3210 avatar Dec 30 '24 01:12 Masamune3210

We're getting there, but things are still a bit fuzzy it seems.

Yeah, its not making an archive out of the files (which is what zip and 7z are, file archives), but its basically encoding the data so that it fits in less space than if it was just written out to the disk as is in a way that can be completely reversed, something called lossless encoding.

That's close, but not quite right. The reason it shows up as 10GB but is smaller is because the system knows that the file will end up as 10 GB so it fakes it to the user, basically creating a ghost of the file. The size is set to 10 GB because it knows that is what it should be at the end, but the amount of space allocated on the disk is only as much data as has actually been written. This also comes into play with compression, so you can have a 5 GB file only have 3.4 GB allocated because the compression managed to squeeze the data into 3.4 GB of space on the disk instead of the 5 GB that it would normally take up.

Yeaaaaaah, I wouldn't touch C:\ unless you REALLY want to reinstall Windows.

Hehe I knew the C:\ idea was silly I just being facetious.

Thank you so much this has all been quite interesting.

I think I'll compress all my Games though that I barely play for fun.

xSimone avatar Jan 01 '25 02:01 xSimone

Yeaaaaaah, I wouldn't touch C:\ unless you REALLY want to reinstall Windows.

I do not recommend it but I was desperate enough to do it, I ran it as admin and selectively ran it on each folder in C: drive.

It excludes windows directory by default (it can be compressed natively in windows by running Compact.exe /CompactOS:always in cmd), So 'windows' didn't really break.

but here're some side effects:

  • Some browser sessions were cleared -- So I had to login again on most browser based apps I use (including discord).
  • Most Windows UWP (or WinUI or whatever name Microsoft uses for windows native apps these days) Apps displayed a window before launching that said 'checking for updates' and then launched normally after 10 seconds or so. but it happened every single time I opened them. -- Some of these apps are (Arc browser, Pieces for Developers and Pieces OS, and WhatsApp). -- But all windows apps displayed this message at least once, the ones I mentioned kept displaying it every time. -- Eventually (I guess after they received new updates that changed the files back to non-compressed) it fixed itself.

aaaand that's about it! I still don't recommend it though

Creative-Geek avatar Jan 01 '25 05:01 Creative-Geek