The read-back will always be exactly (640 * 1024) bytes. Ya just have to compare from the beginning only the number of bytes actually sent.

Cheers