From 615bfbf5bde20dccb423a97fa77abfc5cf5ee670 Mon Sep 17 00:00:00 2001 From: Miguel Date: Mon, 22 Apr 2024 04:28:02 -0300 Subject: [PATCH] Eliminar CopyPaste.py --- CopyPaste.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 CopyPaste.py 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