Do you really need the calls to ``tell()`` here, or can you just keep a running count of bytes read?