A SwiftPackReader that mimic read and sync method

The reader allows to read a specified amount of bytes from a given offset of a Swift object. A read offset is kept internaly. The reader will read from Swift a specified amount of data to complete its internal buffer. chunk_length specifiy the amount of data to read from Swift.

Method __init__ Initialize a SwiftPackReader
Method read Read a specified amount of Bytes form the pack object
Method seek Seek to a specified offset
Method read_checksum Read the checksum from the pack
Method _read Undocumented
def __init__(self, scon, filename, pack_length):
Initialize a SwiftPackReader
Parametersscona SwiftConnector instance
filenamethe pack filename
pack_lengthThe size of the pack object
def _read(self, more=False):
Undocumented
def read(self, length):
Read a specified amount of Bytes form the pack object
Parameterslengthamount of bytes to read
Returnsbytestring
def seek(self, offset):
Seek to a specified offset
Parametersoffsetthe offset to seek to
def read_checksum(self):
Read the checksum from the pack
Returnsthe checksum bytestring
API Documentation for Dulwich, generated by pydoctor at 2018-11-17 19:05:54.