When compressing a file located on drive C, to an archive located on drive C, 7-Zip will happily fill up drive D with some amount of gigabytes, to a totally hidden file thing. I've seen this happen - the source drive was gradually filling up to the point of having no space left, even though the drive for the target archive had plenty free space, orders of magnitude more than the size of the archive or even the source file.
Source file in question is a 3.5GB file that ultimately compressed down to about 320MB. Free space on source drive is about 3GB. This will fill her up to the point of 0 bytes freespace. It looks like I somehow magically need as much free space on the source drive, as the uncompressed size of the archive, regardless of where the archive goes.
This is of course, not desirable. The expected behaviour would be not to fill up the source drive - in fact don't write anything to it. For all we know, I might be archiving it because it is about to break. Whatever the case, it makes no sense to write to a drive that is only expected to read from.
And then there's the question of what is written. I could not for the life of me find which file was being written to. Not even Process Hacker could give me that information (although I could be missing something). Nevertheless, it's not a file. It's... something invisible. Not like a hidden file, but a really hidden file. It wasn't even in System Volume Information. It's was really really hidden. Like, super-really hidden.
After creating such archive is complete (or it errors out) the reduced freespace on the source drive remains for "some time". It's almost like some process needs to come round to clear it. A chkdsk with the /f switch forces this cleanup, whatever it is.
This happens with compression to the 7z format, on the default "ultra" preset, with encryption by password enabled. Not sure if any of these settings matter - they might not.
I'm using 7-Zip 22.01 using the GUI, on Windows 10. Both are x64.
Correction: When compressing a file located on drive D
How do I edit a bug report? I'm used to Github...
Maybe it's swap file, because ram size is not big for selected compression options?
try "fast" settings instead of "ultra".
Last edit: Igor Pavlov 2023-04-29
Memory utilisation is at 27%.
But even if it's a swapfile, where would it be? If you mean the Windows pagefile, then no.
Even if my source drive is X or G or L or whatever, that's always the one also filling up without it being the destination drive. So if it's some kind of swapfile, 7-Zip is creating it. But there's not a single extra file being created on the source disk, yet it's filling up. 100% reproducible as well, so far.
What is drive where target archive ?
Is it removable?
There are some related options in Options/Tools/Folders.