class documentation

class SwiftPackReader(object):

View In Hierarchy

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 internally. The reader will read from Swift a specified amount of data to complete its internal buffer. chunk_length specify 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 read_checksum Read the checksum from the pack
Method seek Seek to a specified offset
Instance Variable base_offset Undocumented
Instance Variable buff Undocumented
Instance Variable buff_length Undocumented
Instance Variable filename Undocumented
Instance Variable offset Undocumented
Instance Variable pack_length Undocumented
Instance Variable scon Undocumented
Method _read Undocumented
def __init__(self, scon, filename, pack_length):

Initialize a SwiftPackReader

Parameters
scona SwiftConnector instance
filenamethe pack filename
pack_lengthThe size of the pack object
def read(self, length):

Read a specified amount of Bytes form the pack object

Parameters
lengthamount of bytes to read
Returns
a bytestring
def read_checksum(self):

Read the checksum from the pack

Returns: the checksum bytestring

def seek(self, offset):

Seek to a specified offset

Parameters
offsetthe offset to seek to
base_offset =

Undocumented

buff =

Undocumented

buff_length =

Undocumented

filename =

Undocumented

offset: int =

Undocumented

pack_length =

Undocumented

scon =

Undocumented

def _read(self, more=False):

Undocumented