class documentation

Abstract iterator over pack data based on delta chains.

Each object in the pack is guaranteed to be inflated exactly once, regardless of how many objects reference it as a delta base. As a result, memory usage is proportional to the length of the longest delta chain.

Subclasses can override _result to define the result type of the iterator. By default, results are UnpackedObjects with the following members set:

  • offset
  • obj_type_num
  • obj_chunks
  • pack_type_num
  • delta_base (for delta types)
  • comp_chunks (if _include_comp is True)
  • decomp_chunks
  • decomp_len
  • crc32 (if _compute_crc32 is True)
Class Method for_pack_data Undocumented
Method __init__ Undocumented
Method __iter__ Undocumented
Method ext_refs Undocumented
Method record Undocumented
Method set_pack_data Undocumented
Method _ensure_no_pending Undocumented
Method _follow_chain Undocumented
Method _resolve_object Undocumented
Method _result Undocumented
Method _walk_all_chains Undocumented
Method _walk_ref_chains Undocumented
Class Variable _compute_crc32 Undocumented
Class Variable _include_comp Undocumented
Instance Variable _ext_refs Undocumented
Instance Variable _file Undocumented
Instance Variable _full_ofs Undocumented
Instance Variable _pending_ofs Undocumented
Instance Variable _pending_ref Undocumented
Instance Variable _resolve_ext_ref Undocumented
Instance Variable _shas Undocumented
@classmethod
def for_pack_data(cls, pack_data, resolve_ext_ref=None):

Undocumented

def __init__(self, file_obj, resolve_ext_ref=None):

Undocumented

def __iter__(self):

Undocumented

def ext_refs(self):

Undocumented

def record(self, unpacked):

Undocumented

def set_pack_data(self, pack_data):

Undocumented

def _ensure_no_pending(self):

Undocumented

def _follow_chain(self, offset, obj_type_num, base_chunks):

Undocumented

def _resolve_object(self, offset, obj_type_num, base_chunks):

Undocumented

def _walk_all_chains(self):

Undocumented

def _walk_ref_chains(self):

Undocumented

_include_comp: bool =

Undocumented

_ext_refs: list =

Undocumented

_file =

Undocumented

_full_ofs: list =

Undocumented

_pending_ofs =

Undocumented

_pending_ref =

Undocumented

_resolve_ext_ref =

Undocumented

_shas: dict =

Undocumented