Known subclasses: dulwich.pack.PackStreamCopier

Class to read a pack stream.

The pack is read from a ReceivableProtocol using read() or recv() as appropriate.

Method __init__ Undocumented
Method offset Undocumented
Method read Read, blocking until size bytes are read.
Method recv Read up to size bytes, blocking until one byte is read.
Method __len__ Undocumented
Method read_objects Read the objects in this pack file.
Method _read Read up to size bytes using the given callback.
Method _buf_len Undocumented
def __init__(self, read_all, read_some=None, zlib_bufsize=_ZLIB_BUFSIZE):
Undocumented
def _read(self, read, size):

Read up to size bytes using the given callback.

As a side effect, update the verifier's hash (excluding the last 20 bytes read).

ParametersreadThe read callback to read from.
sizeThe maximum number of bytes to read; the particular behavior is callback-specific.
def _buf_len(self):
Undocumented
@property
def offset(self):
Undocumented
def read(self, size):
Read, blocking until size bytes are read.
def recv(self, size):
Read up to size bytes, blocking until one byte is read.
def __len__(self):
Undocumented
def read_objects(self, compute_crc32=False):
Read the objects in this pack file.
Parameterscompute_crc32If True, compute the CRC32 of the compressed data. If False, the returned CRC32 will be None.
ReturnsIterator over UnpackedObjects with the following members set: offset obj_type_num obj_chunks (for non-delta types) delta_base (for delta types) decomp_chunks decomp_len crc32 (if compute_crc32 is True)
RaisesChecksumMismatchif the checksum of the pack contents does not match the checksum in the pack trailer.
zlib.errorif an error occurred during zlib decompression.
IOErrorif an error occurred writing to the output file.
API Documentation for Dulwich, generated by pydoctor at 2018-11-17 19:05:54.