def do_at_current_position(&block)
        current_position = self.tell
        huge_buffer = self.read
        self.seek(current_position, IO::SEEK_SET)
        block.call
      ensure
        self.write huge_buffer
      end
def do_at_current_position(&block)
        current_position = self.tell
        huge_buffer = self.read
        self.seek(current_position, IO::SEEK_SET)
        block.call
      ensure
        self.write huge_buffer
      end
remembers current file position, reads everything at the position
 execute the block, and put everything back.
 This routine is really bad for huge files since it could run out of
 memory.