Rewind body instead of reopening the window.
Rename sizeReader and sizeWriter to countReader and countWriter.
Use ReadByte instead of allocating one byte each time through the loop.
Cleanup naming.
Refactor handling of a formatting change.