cp2077_extractor.cr2w.header_structs
Classes to represent header data in CR2W/W2RC files.
Classes:
|
Metadata about a buffer in a CR2W/W2RC file. |
|
CR2WEmbeddedInfo(import_index, chunk_index, path_hash) |
|
CR2WExportInfo(class_name, object_flags, parent_id, data_size, data_offset, template, crc32) |
|
Represents a read and parsed CR2W/W2RC file. |
|
Represents the header of a CR2W/W2RC file. |
|
Data about the file structure of a CR2W/W2RC file. |
|
CR2WImport(depot_path, class_name, flags) |
|
CR2WImportInfo(offset, class_name, flags) |
|
Metadata about the CR2W/W2RC file. |
|
Metatada about a name in the name lookup table of a CR2W/W2RC file. |
|
CR2WPropertyInfo(class_name, class_flags, property_name, property_flags, hash) |
|
A table holds various data about the structure of the CR2W/W2RC file, such as |
|
-
namedtuple
CR2WBufferInfo(flags, index, offset, disk_size, mem_size, crc32)[source] Bases:
NamedTupleMetadata about a buffer in a CR2W/W2RC file.
- Fields
flags (
int) – Alias for field number 0index (
int) – Alias for field number 1offset (
int) – offset inside a cr2w file, buffers are compressed and appended to a cr2w filedisk_size (
int) – This is the compressed size of the buffer; it’s called disksize because buffers are compressed and appended to a cr2w filemem_size (
int) – This is the uncompressed size of the buffer; it’s called memSize because buffers are uncompressed at runtime in the gamecrc32 (
int) – crc32 over the compressed buffer
-
__repr__() Return a nicely formatted representation string
-
namedtuple
CR2WEmbeddedInfo(import_index, chunk_index, path_hash)[source] Bases:
NamedTupleCR2WEmbeddedInfo(import_index, chunk_index, path_hash)
- Fields
-
__repr__() Return a nicely formatted representation string
-
namedtuple
CR2WExportInfo(class_name, object_flags, parent_id, data_size, data_offset, template, crc32)[source] Bases:
NamedTupleCR2WExportInfo(class_name, object_flags, parent_id, data_size, data_offset, template, crc32)
- Fields
class_name (
int) – Alias for field number 0object_flags (
int) – Alias for field number 1parent_id (
int) – Alias for field number 2data_size (
int) – Alias for field number 3data_offset (
int) – Alias for field number 4template (
int) – Alias for field number 5crc32 (
int) – Alias for field number 6
-
__repr__() Return a nicely formatted representation string
-
namedtuple
CR2WFile(info, metadata, properties, root_chunk, embedded_files)[source] Bases:
NamedTupleRepresents a read and parsed CR2W/W2RC file.
- Fields
info (
CR2WFileInfo) – Alias for field number 0metadata (
CR2WMetadata) – Alias for field number 1properties (
list[CR2WProperty]) – Alias for field number 2root_chunk (
Chunk) – Alias for field number 3
-
__repr__() Return a nicely formatted representation string
-
namedtuple
CR2WFileHeader(version, flags, time_stamp, build_version, objects_end, buffers_end, crc32, num_chunks)[source] Bases:
NamedTupleRepresents the header of a CR2W/W2RC file.
- Fields
version (
int) – Alias for field number 0flags (
int) – Alias for field number 1time_stamp (
int) – Alias for field number 2build_version (
int) – Alias for field number 3objects_end (
int) – Alias for field number 4buffers_end (
int) – Alias for field number 5crc32 (
int) – Alias for field number 6num_chunks (
int) – Alias for field number 7
-
__repr__() Return a nicely formatted representation string
-
namedtuple
CR2WFileInfo(file_header, string_dict, name_info, import_info, property_info, export_info, buffer_info, embedded_info, imports)[source] Bases:
NamedTupleData about the file structure of a CR2W/W2RC file.
- Fields
file_header (
CR2WFileHeader) – Alias for field number 0name_info (
list[CR2WNameInfo]) – Alias for field number 2import_info (
list[CR2WImportInfo]) – Alias for field number 3property_info (
list[CR2WPropertyInfo]) – Alias for field number 4export_info (
list[CR2WExportInfo]) – Alias for field number 5buffer_info (
list[CR2WBufferInfo]) – Alias for field number 6embedded_info (
list[CR2WEmbeddedInfo]) – Alias for field number 7imports (
list[CR2WImport]) – Alias for field number 8
-
__repr__() Return a nicely formatted representation string
-
namedtuple
CR2WImport(depot_path, class_name, flags)[source] Bases:
NamedTupleCR2WImport(depot_path, class_name, flags)
- Fields
-
__repr__() Return a nicely formatted representation string
-
namedtuple
CR2WImportInfo(offset, class_name, flags)[source] Bases:
NamedTupleCR2WImportInfo(offset, class_name, flags)
- Fields
-
__repr__() Return a nicely formatted representation string
-
namedtuple
CR2WMetadata(file_name, hash_version, objects_end, version=195, build_version=0)[source] Bases:
NamedTupleMetadata about the CR2W/W2RC file.
- Fields
-
__repr__() Return a nicely formatted representation string
-
namedtuple
CR2WNameInfo(offset, hash)[source] Bases:
NamedTupleMetatada about a name in the name lookup table of a CR2W/W2RC file.
-
__repr__() Return a nicely formatted representation string
-
-
namedtuple
CR2WPropertyInfo(class_name, class_flags, property_name, property_flags, hash)[source] Bases:
NamedTupleCR2WPropertyInfo(class_name, class_flags, property_name, property_flags, hash)
- Fields
-
__repr__() Return a nicely formatted representation string
-
namedtuple
CR2WTable(offset, item_count, crc32)[source] Bases:
NamedTupleA table holds various data about the structure of the CR2W/W2RC file, such as
CR2WNameInfoorCR2WBufferInfo.- Fields
-
__repr__() Return a nicely formatted representation string
-
protocol
Struct[source] Bases:
ProtocolProtocolfor aNamedTuplerepresenting structured binary data in a file.Classes that implement this protocol must have the following methods / attributes: