Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

Should I use Windows File Compression?

I am running Windows 2000 and I am wondering if I should run the Disk
Cleanup (compress old files). It is currently taking up 14372KB of space.

Should I compress old files?

While you’re only asking about Disk Cleanup, I’m going to talk about Windows
File Compression in more general terms. Using file compression to save space is
nothing new, even when it’s native in the file system used by Windows. But it’s
not necessarily a slam dunk.

In fact, without knowing more, I get to use all of my favorite answers:

Yes.

No.

It depends.

After you’ve finishing beating your head against the computer, read on, and
I’ll explain why.

Become a Patron of Ask Leo! and go ad-free!

Windows File Compression is a part of the NTFS file system that when
enabled, automatically compresses files to take up less space. Seems simple
enough, right?

As a gross oversimplification compression means replacing one
representation of data with another that takes up less space. For example the
string “**********” (10 asterisks) might be replaced with three characters –
“10*” – meaning “ten asterisks”. When decompressed the “10*” would get
transformed back into “**********”. Now, of course there are complications –
for one example we need a way to make sure that if there’s a “10*” in the data
before compression we don’t try to turn it into “**********” on
decompression.

Suffice it to say that real compression algorithms are a complex technology,
bordering on an art form.

So if good compression can “makes things smaller”, what’s the catch?

In my opinion, there are two big ones.

Compression is Work – One thing that they all compression
algorithms share is that they require calculation. That means when you compress
or decompress a file on your computer, your CPU needs to do more work than if
the file were not compressed. Different algorithms have different
characteristics – some require a great deal of CPU processing to compress the
data, while the decompression can be lightning fast. Others compress
comparatively poorly, but take less time to do it.

Compressing files that are already compressed doesn’t help.
– A file that has already been compressed by a reasonably good compression
algorithm will typically not compress well if you try to compress it
again with another. In fact, in the worst case, a “compressing” a compressed
file can sometimes even make it bigger. And here’s the catch within the catch:
many files you use ever day are already compressed. Typically audio, video and
image formats are already using compression algorithms as part of the file
format. “.mp3”, “.jpg”, “.mpg” files, and similar, are all already
compressed
, and typically to not benefit much from attempts to compress
them further.

So what should you do? When should you consider compression?

“My advice? Don’t bother.”

I’d consider the following:

  • If the files you’re considering compressing are used infrequently, then they
    might be candidates. The “old files” from a disk cleanup utility probably fall
    into this category.

  • If the files you’re considering compressing aren’t already compressed, then
    it could make sense. There’s no way for me to know what files disk cleanup is
    pointing you at, so I can’t say how this might apply to you.

  • If you have a powerful enough CPU, you can compress files used more
    frequently. I definitely wouldn’t compress files I use frequently on an older
    machine. It can slow down your machine as the CPU gets more involved in every
    disk access.

  • Realize that compressed files and compressed file systems are harder to
    recover in the event of a crash. Make sure that you’re appropriately backed
    up.

My advice? Don’t bother. Compression on average will probably recover only
about 50% of the space used by files you compress. If you’re really running
into space problems that have you looking at this, you’re probably better off
adding a hard drive to your system.

I have no compressed file systems on any of the computers I run. I’ve done
so in the past only on laptops where adding or replacing a hard drive just
wasn’t in the cards for me, and only after I’ve started to run out of space and
other options didn’t free up enough.

If you want to investigate file compression further, note that when using
NTFS compression is not all-or-nothing. For example you can select which
folders should be compressed. Just right click on the folder in Windows
Explorer, select Properties, and on the
General tab, click on Advanced. There you’ll
see Compress contents to save disk space. Select that and the
folder and optionally all folders within it will be compressed and all further
files placed in those folders will be automatically and transparently
compressed. Don’t do that to active folders, such as C:\Windows or
c:\Windows\System32 for example, because it’ll adversely impact your
performance. But if you have large collections of data that aren’t already
compressed, and aren’t used that frequently, and your CPU won’t get in the way,
it might be an option.

And in the long run, allowing your disk cleanup utility to compress old
files likely won’t hurt. It probably just won’t get you a lot either.

Do this:

Subscribe to Confident Computing! More confidence & less frustration -- solutions, answers, & tips -- in your inbox every week.

I'll see you there!

40 comments on “Should I use Windows File Compression?”

  1. I have at least one good use for NTFS compression: Virtual Machines with Virtual hard drive images. Although the more advanced virtualisation programs have “dymanically expanding” hard drive formats where the image file only takes up the amount of used space on the Hard Drive, I sometimes like to use “raw” image files so that they can be accessed by more than one program.

    These raw image files take up exactly the amount of space that they need, including any free space. This means that if I have a 30Gb virtual hard drive, with only 10Gb content on it, the image file will still take up 30Gb unless I NTFS compress it (in which case it takes up a little under 10Gb).

    The effect on the VM? I’m kinda unsure. I suppose using a compressed image file might slow down hard drive access a bit, but I wouldn’t have thought it would be too drastic. If there is a good way to scientifically test this I’d be interested to see.

    Reply
  2. I am using NTFS on my current PC and have file the compression tab unchecked on all my hard disk’s but when i did a disk clean up, i wound up with alot of files/folders with blue names (compresed).

    Now that is causing crash’s and slowdowns on my computer.
    my question is how to undo what windows decided to do on its self?

    Reply
  3. Hi, recently I’ve tried compressing files with the already installed application on Windows (WinZip). However, on my computer, the most it compresses of anything is maybe 10 kb, which obviously is pretty useless. I’ve tried using some other program I downloaded but it had the same result. But, when I use another computer, it compresses up to 50% of the file’s size. And I haven’t been using the files you mentioned as already compressed (mp3, jpg).

    The article was good. (I also wanted to know about saving file space, and this helped!)

    Reply
  4. “I am using NTFS on my current PC and have file the compression tab unchecked on all my hard disk’s but when i did a disk clean up, i wound up with alot of files/folders with blue names (compresed).

    Now that is causing crash’s and slowdowns on my computer.
    my question is how to undo what windows decided to do on its self?” go to start-run-type cmd- in the command prompt type compact /u /s /a /q /i that should uncompress every file on ur disc but u have to re-compress those files u want compressed.

    Reply
  5. Good morning.
    I can no longer open some of my photos ( a lot actually). I click on them and it says no view possible, even though they finish .jpg as they should. I believe I compressed these files when I did my last disk clean and therefore my current situation.
    Could you tell me if I have indeed done what I think, or if not what you think, and if I have compressed all of these images, how to uncompress them.
    I am on Windows XP Pro.
    Thank you in advance,
    Vladimir

    Reply
  6. Your answer helped me decide not to compress the old files in disk cleanup, but I was disinclined to do so because my really quite new computer takes a very long time to measure the ‘compress old files’ space and then a long time to do the actual compression. Does this point to some big problem with my old files , like a corruption or something?

    Reply
  7. Thank you, Jon, for the instructions on how to decompress all your files that windows did without your permission. I have now changed the setting to NOT allow that, but it was a nightmare trying to fix everything by hand until I saw you post. Your instructions worked, although I am obviously not as computer literate as you and it took a while for me to figure out exactly what to do for my situation. THANK YOU SO VERY MUCH, Leo and Jon!!! Donna in Texas

    Reply
  8. Is there a way to uncompress all the files that you compressed in a disk clean up, without having to go through and uncheck the box in the actual files properties menu? I noticed that after compressing them in Windows XP the compressed files are now blue. I did notice that once I did it, all the files that got compressed are now in blue font, when you look at them in the folders. That freaked me out a little. However, when you right click on the file, go to properties, then go down to “advanced” in the general tab, it has a check box for compressing the file. If you uncheck it, I guess it decompresses it, because it turns back to black font. Is there a way to do this for all the files like this, without having to do them individually? Thanks for your help, dude.

    Reply
  9. —–BEGIN PGP SIGNED MESSAGE—–
    Hash: SHA1

    You can select multiple files at once – hold down CTRL as you click on files to
    add them one at a time, or hold down shift to select all files between the
    first on you click on and the second. Or type CTRL+A to select all files. Then
    right click on the multiple files and select properties. If you select a
    folder, it’ll ask if you want the change to be applied to all files in
    subfolders as well.

    Leo

    —–BEGIN PGP SIGNATURE—–
    Version: GnuPG v1.4.7 (MingW32)

    iD8DBQFGxPdMCMEe9B/8oqERApQxAJwMfACRY3GcBXwWQAjbH4YLrOGxzgCghd8T
    hBfN07gMzrC9ybk9iNAZB7g=
    =Lmmj
    —–END PGP SIGNATURE—–

    Reply
  10. I have accidently compress alarge amount of my XP PRO NTFS drive. How do I undo the compression without going to each individual file and reseting its properties?

    rgards
    Martin B

    Reply
  11. Martin-
    You can use the ‘compact’ command in DOS. Open command prompt and type:
    compact /u /s:C:\ /a /q /i
    This will uncompress the entire C drive.

    To uncompress a specific directory type:
    compact /u /s:C:\[folder] /a /q /i

    Reply
  12. i am trying to uncompress my compressed old files from a disk cleanup, and used the following instructions:

    You can use the ‘compact’ command in DOS. Open command prompt and type:
    compact /u /s:C:\ /a /q /i
    This will uncompress the entire C drive.

    To uncompress a specific directory type:
    compact /u /s:C:\[folder] /a /q /i

    however, i am getting the following error:
    ‘compact’ is not recognized as an internal or external command, operable program or batch file.

    any suggestions?

    – sheri

    Reply
  13. —–BEGIN PGP SIGNED MESSAGE—–
    Hash: SHA1

    Should be in c:\windows\system32\compact.exe in Windows XP.

    Leo

    —–BEGIN PGP SIGNATURE—–
    Version: GnuPG v1.4.7 (MingW32)

    iD8DBQFHvF98CMEe9B/8oqERAqUQAJ0QGeLmoR8SUx3Xw0qYp0aE++bwDQCeJIyG
    u+Qu6xDUFaVIf7DfJMIKjKM=
    =nA+a
    —–END PGP SIGNATURE—–

    Reply
  14. great newsletter/website. here’s my problem; removing items from drive C does not give me extra space! in fact, I LOSE space! can you please talk me thru this prob/tired paying local techs, who dont get the job done. please reply to my e-mail address. any help much appreciated. one more thing; i’m a writer, not a puter whiz, just know and use the basics. thnx

    Reply
  15. —–BEGIN PGP SIGNED MESSAGE—–
    Hash: SHA1

    It depends on which files you’re attempting to delete and
    exactly how you’re deleting them. I’d first make sure that
    you empty your recyle bin (right click on it and click on
    “Empty”) to reclaim the space.

    Leo

    —–BEGIN PGP SIGNATURE—–
    Version: GnuPG v1.4.7 (MingW32)

    iD8DBQFIA1bOCMEe9B/8oqERAtJAAJ95eyw56oHQTOcA37nXbGci2wCu6ACffy4Y
    6LlmFCGC/HnDAfhZJLfTEUM=
    =3aJS
    —–END PGP SIGNATURE—–

    Reply
  16. I want to uncompress all of the files that disk cleanup compressed; how exactly can I do this for all files on my C drive – I have XP Windows operating system. Previous comments were not explicit and exacting for XP.

    Reply
  17. To decompress the entire drive, should I use SAFE MODE and:-
    DOS command “compact /u /s:C:\ /a /q /i”; or
    Windows C:\ properties and check the box to
    “Compress drive to save Disc space” and click Apply,
    and then UNcheck the box and Apply then OK ?

    I am using pre-installed Windows XP Home edition with SP2 + SP3, and have no installation disc.
    When Disc Cleanup compressed files Windows File Protection refused to trust Windows own utility, and validated all registered dlls etc., and dumped uncompressed copies into dllcache, and gave me excessive grief, demanding that I give it the non-existent installation disc.

    I assume W.F.P. will also complain about decompressing files, which is why I want to use SAFE MODE to avoid W.F.P. involvement.

    C: Windows properties has the Disc Cleanup option, and it also shows
    “Used Space 7,825,747,968”.
    Windows Explorer, selecting the entire contents of C:\ and showing all the hidden/system/etc things reports
    Size : 7.38 GB (7,933,352,967 bytes)
    Size on Disc: 6.49 GB (6,979,273,055 bytes)
    This seems to omit
    7,825,747,968 – 6,979,273,055 = 846,474,913 bytes.
    About 500 Mbytes are in my daughter’s profile which is hidden from me, so another 346 MBytes are other things that Windows will not let me see.

    Both Windows and DOS hide 10% of all files, so I fear that both the DOS command, or selecting the entire contents Windows will show me, will only decompress the 90% I can see, and to decompress the other 10% I need to use “(C:) Properties”

    I would greatly appreciate your advice upon this.

    Would you please advise on the safest methods.
    My greatest fear is that Windows defragmentation will blow a fuse and give me perpetual BSODs. I use Acronis Trueimage and am happy to restore upon any errors – so long as I dont have the trauma of a broken system and need to use the recovery console.

    Regards
    Alan Borer.

    Reply
  18. I would like to know if there is a way to defrag without compacting files. I have over 67% disk space available abd would like to avoind compression since it will needlessly slow down file access. Thanks for your help!

    Defragging and compression are unrelated. If you defrag using the built-in Windows tools, it will not automatically compress.

    Leo
    19-Sep-2009

    Reply
  19. Please let me know what is the difference between disk compression and disk defragmenting.

    How often should each be run(on a PC and also on a laptop)?

    I am using windows XP operating system on both.

    Reply
  20. What happens if you have already compressed the files with disk cleanup? How difficult and what problems might one encounter by uncompressing? I believe this has happened on the work computer (windows xp and disk cleanup) and I believe it has cost us a lot in speed. If I just uncheck compress files in disk cleanup could that cause problems using those files?

    Unchecking compression should just work. As with all cases of “it should work” make sure you have good backups first.

    Leo
    05-Jan-2010

    Reply
  21. I used windows disc tools to compressed 11GB of data and it slowed slowed my PC, defrage went from 2 minutes to 50 minutes, write from 60MB/S to 15MB/S,it was like a virus, everything took forever, I uncompressed and the speed came right back to normal, I’ll never touch that again

    Reply
  22. How do I DE-Compress a drive that has been compressed.

    Simply uncheck the compression option at a top level folder and let it apply to all subfolders and files.

    Leo
    22-Apr-2010

    Reply
  23. One thing you are neglecting with this comment is that compression is a good way to get extra SPEED out of some operations — specifically, those that read heavily or write a lot of small files.

    With our build system — which moves about 500 meg of small files — turning on disk compression on the build target directory increases speed about 6%, and turning on disk compression on the build source directory increases speed by a futher 13%. That’s nearly 20% with a right click; and this is on an SSD!

    Other operations that have seen speedups are local database operations, Firefox rendering speed and Photoshop scratch disk access.

    The long and short of modern computing is that we usually have more much more idle processor time than idle IO bandwidth when performing IO operations.

    Just don’t compress your root directory. It’ll let you — then your machine won’t boot. Spoken from XPerience.

    Reply
  24. I don’t want compressed files, and the option to compress is unchecked. But, when I go back and see old files, they are always compressed. I have even manually chose properties on idividual folders and uncompressed them and subfolders and files, only to come back and they are compressed again. Is it a poltergeist. xp pro sp3

    Reply
  25. Tom Kelly, to uncompress your compressed files, do the following.

    1. Go to the folder or disk you want uncompressed and open its properties where you can see the checkbox for compression (your post tells me that you know where this is, so I haven’t written verbose steps for this).

    Note: To uncompress everything on the drive, select the desired drive.

    2. Check the box and click Apply.

    Note: This will NOT compress anything! Please continue.

    3. Select “Apply changes to C: only” and press OK. (Or, in place of C:, “this folder”.)

    Note: This will only compress the files directly inside the selected item. It will NOT compress any folders or any files inside folders.

    4. Uncheck the box and click Apply.
    5. Ensure “Apply changes to C:, subfolders and files” is selected and press OK.
    6. Wait for completion.
    7. (Optional) Enjoy.

    Reply
  26. I think the use of compressed files is appropriate for backups. I’m currently doing incremental backups of an internal 500GB drive with an external 500GB drive. The incremental backup runs as a scheduled task at 1AM and has run out of space on the external drive. I am not concerned about the performance once the initial backup is run.
    I am just trying the compression for the first time and it’s saying it will take 3 days to compress the files on my backup that I have now. If there is adequate space savings, I could put off another hard drive purchase for a year or so with minimal effort on my part.

    Reply
  27. Thanks, but I said the option IS unchecked–for the drive, and I apply to all the subfolders which doesn’t work. That is why I said I manually click ALL files because the folder compress properties IS unchecked. But, even when I manually decompress individual files, I come back days later, and there are some compressed files, and I check folder properties which is still unchecked. The only reason I know they are compressed is the text is BLUE and uncompressed is black. Maybe THAT is wrong, and they really are uncompressed???

    Reply
  28. Hi,

    I have run into trouble. I compressed a large amount of data on my PC, but unfortunately it crashed.

    I was able to recover all the data but I am unable to read any of the file and get to see an error that it is a unrecognized format.

    Its close to 3GB important data, any means I can recover it.

    regards

    Reply
  29. i compressed files not knowing it would shut me out of my computer I get this on reboot ngdbr is compressed novice with computer
    help please

    Reply
  30. What can I do?? when I try to turn on my computer before I started on the screen appears”;;; Btrnmgt is compressed’. I don’t know how to majs my computer start or even turn it on!??? What can I do? V v

    I honestly don’t know. I’d have to know how the system was compressed, and then hope that that technology has some way to move beyond this point.

    Leo
    07-Feb-2012
    Reply
  31. Hi Leo, I compressed my files when trying to free up space on my C drive, then decided I had made a mistake. I have uncompressed all the files and folders, but when I create and/or save any new docs, pics, or anything – they come up as ‘compressed’ in blue. I have looked on my ‘C drive’ in ‘Computer’, but the compress box is unchecked. How do I undo this compression, please? I am using Win7 – 32 bit.
    Thanks. Susie Kay

    Reply
  32. I recall compressing my other computers also. The entire system doesn’t seem to respond well. Pop ups occur asking whether you want to “yes to all”. It doesn’t finish the job either. Normally it would take 6 Hours. When I try to uncompress, errors appear on the screen. Desktop fonts appear to be blurry and minimized. You can’t uncompress it either. My suggestion, DO NOT compress your files. They do little of nothing to save disk space. Your modern computer already has 100x’s the disk space left. If your computer is slow, check your processor (cpu). Type CTRL+ALT+Delete. Then click on Performance. Check the activity. If spikes show higher than 80%, there’s lots of usage.

    Reply
  33. Leo, does compressing pictures or audio files make them suffer any loss of quality (in the same way as converting, for example, a .png as a .jpg) ? – which example I take to be irreversible. Many thanks and Season’s Greetings to you – David

    No. Generic compression algorithms like .zip, or Windows File Compression, are lossless.

    Leo
    23-Dec-2012
    Reply
  34. Many thanks, Leo and also thanks to Mark J. (Loss of quality in audio is such a touchy subject. So much depends on the original – vinyl records, for example, and presumably most radio signals always had to be ‘compressed’ though not in the same way. A friend of mine swears that minidiscs are inferior though I’ve always been happy with mine…)

    Reply
  35. “My advice? Don’t bother. Compression on average will probably recover only about 50% of the space used by files you compress. If you’re really running into space problems that have you looking at this, you’re probably better off adding a hard drive to your system.”

    I find that a rather ignorant comment that’s clearly based on personal circumstances. I wouldn’t like to give a dime to every person out there in the USA who can’t afford a new hard drive right now. There is nothing wrong with compression, it’s used everywhere, even in data transmission. Data compression on a hard drive can be very useful for those people who want to extend the life of their data or backup drive (I wouldn’t advice it for the OS partition). Performance isn’t so much an issue anymore like it used to be, because the author ignores the fact how powerful modern processors have become.

    The article is an example of how people are pushed into upgrades that they don’t really need. Heck, you’ll be surprised how many people don’t need that new drive after an assessment of the data on that drive by an experienced end user or professional.

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.