You should be able to read/write many KB at a time, limited only by available memory.
I'm not sure, but you may run into memory issues doing this, because each read/write creates a new string, which even though it becomes unreferenced in the next loop iteration, won't necessarily be garbage collected. If this does become a problem, you can use collectgarbage to force collection.