class documentation

class SwiftPackData(PackData):

View In Hierarchy

The data contained in a packfile.

We use the SwiftPackReader to read bytes from packs stored in Swift using the Range header feature of Swift.

Method __init__ Initialize a SwiftPackReader
Method close Undocumented
Method get_object_at Given an offset in to the packfile return the object that is there.
Method get_stored_checksum Return the expected checksum stored in this pack.
Instance Variable pack Undocumented
Instance Variable pack_length Undocumented
Instance Variable scon Undocumented
Instance Variable _filename Undocumented
Instance Variable _header_size Undocumented
Instance Variable _num_objects Undocumented
Instance Variable _offset_cache Undocumented

Inherited from PackData:

Class Method from_file Undocumented
Class Method from_path Undocumented
Method __enter__ Undocumented
Method __eq__ Undocumented
Method __exit__ Undocumented
Method __len__ Returns the number of objects in this pack.
Method calculate_checksum Calculate the checksum for this pack.
Method check Check the consistency of this pack.
Method create_index Create an index file for this data file.
Method create_index_v1 Create a version 1 file for this data file.
Method create_index_v2 Create a version 2 index file for this data file.
Method get_compressed_data_at Given offset in the packfile return compressed data that is there.
Method iterentries Yield entries summarizing the contents of this pack.
Method iterobjects Undocumented
Method sorted_entries Return entries in this pack, sorted by SHA.
Property filename Undocumented
Property path Undocumented
Method _get_size Undocumented
Method _iter_unpacked Undocumented
Instance Variable _file Undocumented
Instance Variable _size Undocumented
def __init__(self, scon, filename):

Initialize a SwiftPackReader

Parameters
scona SwiftConnector instance
filenamethe pack filename
def close(self):

Undocumented

def get_object_at(self, offset):

Given an offset in to the packfile return the object that is there.

Using the associated index the location of an object can be looked up, and then the packfile can be asked directly for that object using this function.

def get_stored_checksum(self):

Return the expected checksum stored in this pack.

pack =

Undocumented

pack_length =

Undocumented

scon =

Undocumented

_filename =

Undocumented

_header_size: int =

Undocumented

_num_objects =

Undocumented

_offset_cache =

Undocumented