What block allocation algorithm does NTFS use?
Solution 1:
IIRC, the NTFS filesystem attempts to allocate the file in contiguous storage. However it can only do that if the filesystem knows the size of the file. If you open a file and start writing to it, it'll write to the "best" place to fit the file (typically towards the outside of the platter). But that "best" place might not be big enough to fit the file.
If the application tells NTFS the actual size of the file (with SetEndOfFile()), NTFS can do a better job of finding contiguous space for the file (the SetEndOfFile API causes NTFS to allocate storage for the entire file).
Solution 2:
Your problem must be with Opera. I have just looked at a bunch of files on a very full and fragmented drive. Large files downloaded using Chrome were all contiguous.
This suggests that Chrome knew the size of file at the start of download, so told NTFS the size of file to expect. If you do that NTFS will try to place file in a single fragment, or when no fragment is big enough, into the largest available fragments. Interestingly it always uses these fragments in descending order of size, so large files copied by Explorer onto a fragmented drive, can jump around all over the drive.
Where the program does not know the file size, or does not bother to tell NTFS, but instead just opens a file and starts writing sequential data, it appears that NTFS acts very similar to FAT32, which simply starts at the first available cluster (or the first one available after the last allocated in that session) then uses whatever is available from there forward. As an example, at about the same time I asked CCleaner to scan the registry, causing it to back it up to a large txt ".Reg" file. This file started near the start of drive and then was scattered across 127 different fragments. Unlike files copied with Explorer, or downloaded with Chrome, in every file I looked at, the clusters were allocated in ascending order.
For this research I used Winhex (free trial version available from Winhex.com). When looking at a directory entry. right-click on a filename and choose Position, List Clusters, to see list of clusters used by that file.