Wednesday, December 20, 2017

Autozeep v3

What better way to prove that I'm not dead yet but to post about a new old-school freeware utility. The zipfile even contains a readme.txt file which you should definitely read carefully before you use the software.

Autozeep is a tiny tool that utilizes an often forgotten feature of NTFS: transparent compression of your files on the cluster level (or "block level", I can't remember what terminology Microsoft uses). What this means is that you can have compressed files which can be read and written to without having to manually decompress them. The compression isn't great but it can give you some free space if you are running out which, surprisingly, is not that unheard of since we started using smaller SSDs. Additionally if you are on an HDD with a fast CPU, in theory you may even see an increase in read speed if you are reading compressed files, since the bottleneck is the drive's read spread and not the CPU's decompression speed. YMMV

Windows already has some system directories marked as compressed. For example the directory where the Windows Error Reporting system reports gets stored is marked as compressed, meaning any error report that gets saved in there is on the fly compressed.

Now the bad thing about this kind of compression is writing to the compressed files. As I mentioned, if the HDD was you bottleneck, then it may even be faster to first compress your data and then write it, but there is one more thing to consider that doesn't apply to reads: fragmentation. If you try to edit a portion of a compressed file (I think files are compressed in 4K chunks by NTFS but don't quote me on this) you may end up with a larger compressed representation compared to the one you had before. Now the filesystem will need to find a place for the bigger chunk to be written too, creating an extra fragment for your file. Keep writing to the file and it'll become more and more fragmented. Of course, if you are using an SSD fragmentation is less of a problem.

So to avoid these issues and give NTFS compression a try I made Autozeep. It scans all the files in a directory and compresses any files that have not been modified during the last 30 days. Additionally it will decompress any file which has been modified in the last 3 days. The idea is that you can run this script every 7 days on average and it will keep any files that are rarely written to compressed and everything else uncompressed. At the same time it contains a list of file extensions that it will not even try to compress, like media files or archives since those cannot be further compressed by NTFS.

There are quite a few things that you can customize by editing an INI file (we're talking DOS and Win 3.1 technology here) so make sure that you read the readme.txt.

You can download Autozeep v3 from here.

In other news, I've moved to Poland some years ago and I now work like a Java developer. Which is why I can't take good care of most of my projects lately. But I'm still around and I'm still writing small programs every now and then even though I'm not publishing them.

No comments:

Post a Comment

Popular Posts