On 2012-01-08 11:19, Jean-Louis Noel wrote:
> i = 2934129;
>
> ...
>
> The program wrote 2939145 bytes of data.
> I don't understand where I made a mistake.
Probably because you have the files open in text mode. Thus any 0x0A
bytes in the input are being converted to 0x0D 0x0A combinations in the
output. (That is, '\n' is being converted to "\r\n" pairs). Notice that
your output size is slightly larger.
Try opening the files in binary mode using "rb" and "wb."
Peter