bitcoin/bitcoin — pull request #1962 by sipa (2012-10-27 23:45:23+00:00)
Title: Add CBufferedFile and use it for -loadblock and bootstrap.dat

The first commit adds CBufferedFile, which works like CAutoFile, but buffers the data in memory, so it is rewindable, and supports fast scanning inside the buffer.

The second commits switches LoadExternalBlocksFromFile to use CBufferedFile, simplifying it, and removing all fseek()'s.