'Run through the LRF Object index changing the offset by C{delta}.'

@safe
def update_object_offsets(self, delta):

    self._file.seek(self.object_index_offset)
    count = self.number_of_objects
    while (count > 0):
        raw = self._file.read(8)
        new_offset = (struct.unpack(DWORD, raw[4:8])[0] + delta)
        if ((new_offset >= ((2 ** 8) ** 4)) or (new_offset < 76)):
            raise LRFException(_('Invalid    LRF    file.    Could    not    set    metadata.'))
        self._file.seek((-4), os.SEEK_CUR)
        self._file.write(struct.pack(DWORD, new_offset))
        self._file.seek(8, os.SEEK_CUR)
        count -= 1
    self._file.flush()
