diff --git a/CopyPaste.py b/CopyPaste.py deleted file mode 100644 index 7ab7b55..0000000 --- a/CopyPaste.py +++ /dev/null @@ -1,19 +0,0 @@ -def calculate_offsets(db_struct, current_offset=0, parent=None): - """ - Recursively calculate byte offsets for each field in the DB structure considering special types. - """ - last_key_was_bool = False - last_bit_offset = 0 # To track bit offsets within a byte - if isinstance(db_struct, dict): - for key, value in list(db_struct.items()): - if isinstance(value, dict): - if "type" in value and not "offset" in value: - - current_offset = calculate_offsets( - value, current_offset, value - ) # Recurse into nested structs - - elif isinstance(db_struct, list): - for item in db_struct: - current_offset = calculate_offsets(item, current_offset, parent) - return current_offset \ No newline at end of file