Tim Moores wrote:So you don't need to keep 300MB in memory, just 30MB, correct? That's a small amount of memory for a modern computer.
Not even that much. Just a 1-byte buffer would work, although it'd be horribly inefficient. A buffer of 8k-64k would be fine, and he probably wouldn't get any performance gain beyond that, but I don't see any particular reason not to just go with the full 30 MB.