(chunk)
| 1998 | """Analyze and rebuild archives, expecting some damage and trying to make stuff consistent again.""" |
| 1999 | |
| 2000 | def add_callback(chunk): |
| 2001 | id_ = self.key.id_hash(chunk) |
| 2002 | cdata = self.repo_objs.format(id_, {}, chunk, ro_type=ROBJ_ARCHIVE_STREAM) |
| 2003 | add_reference(id_, len(chunk), cdata) |
| 2004 | return id_ |
| 2005 | |
| 2006 | def add_reference(id_, size, cdata): |
| 2007 | # either we already have this chunk in repo and chunks index or we add it now |