https://issues.dlang.org/show_bug.cgi?id=14469 --- Comment #2 from Kenny Alive <artemalive at gmail.com> --- The above algorithm for reading file has a bug. chunkSize should be calculated like this: uint chunkSize = min(size - totalNumRead, 0xffffffff); --