class documentation

Generator for pack data chunks.

Method __init__ Initialize PackChunkGenerator.
Method __iter__ Iterate over pack data chunks.
Method sha1digest Return the SHA1 digest of the pack data.
Instance Variable cs Undocumented
Instance Variable entries Undocumented
Instance Variable object_format Undocumented
Method _pack_data_chunks Iterate pack data file chunks.
Instance Variable _it Undocumented
def __init__(self, object_format: ObjectFormat, num_records: int | None = None, records: Iterator[UnpackedObject] | None = None, progress: Callable[..., None] | None = None, compression_level: int = -1, reuse_compressed: bool = True):

Initialize PackChunkGenerator.

Parameters
object_format:ObjectFormatObject format (hash algorithm) to use
num_records:int | NoneExpected number of records
records:Iterator[UnpackedObject] | NoneIterator of pack records
progress:Callable[..., None] | NoneOptional progress callback
compression_level:intCompression level (-1 for default)
reuse_compressed:boolWhether to reuse compressed chunks
def __iter__(self) -> Iterator[bytes]:

Iterate over pack data chunks.

def sha1digest(self) -> bytes:

Return the SHA1 digest of the pack data.

cs =

Undocumented

entries: dict[bytes, tuple[int, int]] =

Undocumented

object_format =

Undocumented

def _pack_data_chunks(self, records: Iterator[UnpackedObject], *, num_records: int | None = None, progress: Callable[..., None] | None = None, compression_level: int = -1, reuse_compressed: bool = True) -> Iterator[bytes]:

Iterate pack data file chunks.

Returns: Dict mapping id -> (offset, crc32 checksum), pack checksum

Parameters
records:Iterator[UnpackedObject]Iterator over UnpackedObject
num_records:int | NoneNumber of records (defaults to len(records) if not specified)
progress:Callable[..., None] | NoneFunction to report progress to
compression_level:intthe zlib compression level
reuse_compressed:boolWhether to reuse compressed chunks
Returns
Iterator[bytes]Undocumented
_it =

Undocumented