# Functions
CopyNFull does the same as io.CopyN, but it returns io.ErrUnexpectedEOF if CopyN returns io.EOF and the number of bytes written greater than zero.
NewCountingReader wraps the given reader in a reader that ensures the given count variable is atomically updated whenever data is read.