Usage: mkSparse.exe filename Sets the sparse flag on filename and then goes through the file using the FSCTL_SET_ZERO_DATA device i/o control to deallocate the zero data
mkSparse sets the sparse flag on file filename. It then goes through the contents of the file looking for blocks of 0's. For blocks that are >= 64K, it calls DeviceIoControl() to set zero data - this allows the operating system to release the disk-space for these blocks of 0's. It seems that 64K is the minimum block size for which disk space will be freed when you set zero data.
NOTE: THIS UTILITY WRITES TO THE FILE IT OPERATES ON. IT HAS THE POTENTIAL TO CORRUPT YOUR FILE. YOU HAVE BEEN WARNED.
Be aware that for larger filesystems - this utility may take a long time to run. It is worth advising that it is better to create your disk images with mkFile using the -s flag.
MassTranslated on 25 Dec 2004.
MassTranslated on Sun Apr 23 17:36:31 UTC 2006
ManuallyAdjusted on 20 July 2006 (CEST)