class documentation
Class to read a pack stream.
The pack is read from a ReceivableProtocol using read() or recv() as appropriate.
Method | __init__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | read |
Read, blocking until size bytes are read. |
Method | read |
Read the objects in this pack file. |
Method | recv |
Read up to size bytes, blocking until one byte is read. |
Instance Variable | read |
Undocumented |
Instance Variable | read |
Undocumented |
Instance Variable | sha |
Undocumented |
Property | offset |
Undocumented |
Method | _buf |
Undocumented |
Method | _read |
Read up to size bytes using the given callback. |
Instance Variable | _num |
Undocumented |
Instance Variable | _offset |
Undocumented |
Instance Variable | _rbuf |
Undocumented |
Instance Variable | _trailer |
Undocumented |
Instance Variable | _zlib |
Undocumented |
Read the objects in this pack file.
- Returns: Iterator 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)
Parameters | |
compute | If True, compute the CRC32 of the compressed data. If False, the returned CRC32 will be None. |
Raises | |
ChecksumMismatch | if the checksum of the pack contents does not match the checksum in the pack trailer. |
zlib.error | if an error occurred during zlib decompression. |
IOError | if an error occurred writing to the output file. |
overridden in
dulwich.pack.PackStreamCopier
Read up to size bytes using the given callback.
As a side effect, update the verifier's hash (excluding the last 20 bytes read).
Parameters | |
read | The read callback to read from. |
size | The maximum number of bytes to read; the particular behavior is callback-specific. |