Compression / New Thoughts

Discuss new features and functions
Posts: 5
Joined: 11 Nov 2023

meteorquake

I know compression has come up before but I think I may have some new thoughts, which I'll put in the form of an outlined suggestion regarding NTFS.
The settings themself could have a list of file extensions you want compressed for the backup. Obviously you may want doc,xls,txt,log,wav etc compressed but not docx,odt etc.
When the setting has a value and the filesystem is detected to be valid (NTFS here), when it comes to the copying process, FFS creates an empty folder on the destination with compression flag set.
Whenever it copies a file whose extension is earmarked for compression, it would copy to that destination folder (resulting in a compressed file) then moves it to its target location (thus retaining the compression). This is much better than copying to the destination then setting compression. You could also set it so that source files with C flag are copied in this way. Unless of course windows copying internally allows for copying directly with C flag set??
When copying a file whose extension isn't so earmarked, it copies to the destination in the usual way as a temp file and moves it to the target location.
So the two tasks are almost identical. The resulting files then present themselves in just the usual way as files so wouldn't cause any difficulty to the existing scanning setup, purely a slight adjustment to the copy-via methodology.
The reason for compression is that it saves space (sometimes a considerable amount), some SSD lifespan, and if the drive is on a slow link, then speed too. In this instance for example I am backing up my wife's computer into the spare space on my own and it makes a difference to have some compression, however I will have to make two backup folders - one with C flag set and one without - each with their own separate synchronisation task with different extension filters, but I'm presuming it would be ideal not just for me if it could be rolled into one synchronisation task by such a setting, whose implementation I think would be a fairly trivial change to the normal procedure.
David
User avatar
Posts: 2286
Joined: 22 Aug 2012

Plerry

FreeFileSync (FFS) will gladly sync (file-level) compressed files for you.

Just like for encryption, compression is a special task in itself, for which there are several excellent programs available.
It is ultimately up to Zenju, the author of FFS, to decide whether to integrate compression and/or encryption into FFS, but if I were you I would not hold my breath on it ...
Posts: 5
Joined: 11 Nov 2023

meteorquake

Cheers. A little bit of a long shot indeed but since the implementation should be trivial I thought it worth it :) :)
Posts: 943
Joined: 8 May 2006

therube

Just some links.
In particular "some SSD lifespan" would seem to be wrong.
(And supposedly SSD lifespan, in general, is a non-issue these days.)

I'll also note that except for maybe Windows Explorer, other utilities (?) may not "show" the compression (so you may not particularly know what kind of compression ratio you're getting). (And W/E does not really "show" it either, but you could compare a compressed version of a directory against an uncompressed version - via W/E, & you could then "see" the size difference.)

https://superuser.com/questions/1719973/what-exactly-does-ntfs-compression-do-to-files
https://superuser.com/questions/1136329/ntfs-compression-on-ssd-ups-and-downs
https://superuser.com/questions/775042/ntfs-compressed-folders-is-it-possible-to-tweak-compression-ratio
https://superuser.com/questions/411720/how-does-ntfs-compression-affect-performance
https://superuser.com/questions/605398/why-does-ntfs-compression-take-up-a-lot-of-space
.
compressed vs uncompressed folder.png
compressed vs uncompressed folder.png (13.67 KiB) Viewed 5715 times
Posts: 5
Joined: 11 Nov 2023

meteorquake

For the SSD lifespan, I've tended to consider it an issue that can raise its head when you are in the later stages of the SSD filling up as there's more wear from juggling around storage to maintain wear-levelling in a diminished space.
I have compressed files set to show in a different colour. VoidTools "Everything" nicely shows the compression ratio as a column, and the Attributes column can also show it.
The CompactOS I find is extremely effective, with files shrinking hugely, sometimes to 20% of their size, which makes a difference for HDD particularly. But it can also be applied manually in bulk to cover all the program files which I do in that scenario.
NTFS compression is reasonable for compressible files and can be useful on SSDs for unusually large exe files or large .wav files or large numbers of e.g. .htm files, which usually compress well due to the repeated tags. For example I have a very large number of PDF files from archiveorg which I maintain TXT versions of as it helps with searching, so a text file might be 19 Mb which is reduced well and transparently by compression.
The main thing for compression is targetted file type ideally with a size threshold (which I do with Everything) - I wouldn't compress an odt or jpg file for example as they're already in a compressed form
David
Posts: 5
Joined: 11 Nov 2023

meteorquake

I should provide a screenshot of the EXE compression option in action -
a.png
a.png (19.01 KiB) Viewed 5697 times
Posts: 943
Joined: 8 May 2006

therube

(I'll grant you, that particular file does compress extremely well.
Didn't have it, so downloaded it & sure enough 700KB.
Threw libavcodec_plugin.dll & aticaldd64.dll, both ~16 MB to ARJ/7-zip, & size knocked down to ~6 MB.)
The CompactOS
Since I didn't know, Should you compress C drive or compact OS and how to do them.

Note that he is using a 48 GB drive - GB, not TB (& 48 GB I guess you might consider rather minuscule, these days), & says he gained "2.4 GB of space". Now while percentage-wise that is rather large, in the scheme of things you cannot even find a usb flash drive that small these days.

Here also, the same "savings" is noted, Windows 10 can efficiently compress system files. That gives back approximately 1.5GB of storage for 32-bit and 2.6GB of storage for 64-bit Windows.

On my computer at home, I do have literally a few *GB* of free space on my C: partition. (OS is installed on E:.)

That said, it runs just fine. And until it farts or until I feel like cleaning things up, I'll live with those few GB of free space. (It's been that way for a long time now.)

(Maybe if you're on some sort of "ipod"-like thing, where you might have a tiny drive... [but I know nothing of those types of devices].)

On my current computer, OS drive (Win7) is on a 90 GB partition with 52 GB free.
(And I'm thinking my home computer, Win7 also, is also partitioned that way, 90 GB.
And with such a "small" partition, my OS partition - is for the OS & essentially nothing else.)
Posts: 5
Joined: 11 Nov 2023

meteorquake

Yes. CompactOS seems normally to compact just the OS files, but I use it to compact all the program files too; some programs are quite large normally.
What's available for people in a country will depend on matters like the country's economy, or individual finances; people often may get the most out of old machines they have.