Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Windows 7 with NTFS filesystem - I have a bunch of files which contents are purely nulls (confirmed with text editor pspad). Is it possible that I can reclaim this space transparently? That is, if these files are subsequently opened for writing, the space is then allocated.

Understandably this could create a situation of overprovisioning and thus writes could fail if there is not enough free space - this is acceptable in my case.

share|improve this question
up vote 3 down vote accepted

The easiest thing would be to use NTFS compression on these files.

Windows also supports Sparse Files. You would need to be able to modify the programs that create the files to use this.

share|improve this answer
NTFS compression is a good idea, it will require some jiggerypokery on my side as the directory contains a mix of seldom/heavily accessed files - but it would work. It's a shame I can't force Spare Files from my end rather than needing application support - oh well. – aland Feb 23 '13 at 15:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .