code: def seek( self, offset, whence=0 ):
          
          # Determine absolute target position
          if whence == 0:
              target_pos = offset
          elif whence == 1:
              target_pos = self.file_pos + offset
          elif whence == 2:
              target_pos = self.size - offset
          else:
              raise Exception( "Invalid `whence` argument: %r", whence )
          # Check if this is a noop
          if target_pos == self.file_pos:
              return    
          # Verify it is valid
          assert 0 <= target_pos < self.size, "Attempt to seek outside file"
          # Move the position
          self.file_pos = target_pos
          # Mark as dirty, the next time a read is done we need to actually
          # move the position in the bzip2 file
          self.dirty = True
docs: Move the file pointer to a particular offset.