Forum: Suggestions
Topic: Trick to avoid heavy FS frag of ISOs
started by: wOxxOm

Posted by wOxxOm on Aug. 10 2008,02:19
Only 1 software title of a million it seems is aware of FS (NTFS at least) trick to make huge files contiguous (non-frgamented). Otherwise it's quite common to see 500+ FS chunks for 4GB ISOs.

The trick is to allocate file space before actual writing occurs e.g. winapi: CreateFile, SetFilePointer -> projected length, SetEndOfFile, SetFilePointer -> 0. This makes (at least NTFS) FS Windows software layer try to allocate the file in one chunk, or smallest possible quantity of chunks (not sure of the latter).

If a harddrive volume contains free space block large enough to store the requested capacity then the allocation should take (almost) no time. The drawback is that it MAY take much time (a minute maybe on an average fragmented volume per 4GB). However making it an option would benefit many advanced users (I think so) that would like to prevent fragmentation.

Utilities with such an option, that I know of: Flashget (downloader, at least old versions 1.6-1.8), KillCopy (an advanced file copying).