summaryrefslogtreecommitdiff
path: root/python/typelibrary.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2023-04-05 13:54:44 -0400
committerPeter LaFosse <peter@vector35.com>2023-04-18 08:43:10 -0400
commit35adefaa9d1ecf5e8c09a787dbd6bda1d1a49325 (patch)
treef4c313f35ec1ab5e0534f525b6850acc77170a82 /python/typelibrary.py
parent69e005b330a1c71978096e9f98f625e481725a14 (diff)
Add APIs for dumping the contents of TypeLibraries
Diffstat (limited to 'python/typelibrary.py')
-rw-r--r--python/typelibrary.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/python/typelibrary.py b/python/typelibrary.py
index 63e7c33b..adc3919d 100644
--- a/python/typelibrary.py
+++ b/python/typelibrary.py
@@ -55,6 +55,27 @@ class TypeLibrary:
return TypeLibrary(core.BNNewTypeLibrary(arch.handle, name))
@staticmethod
+ def decompress_to_file(path: str, output: str) -> bool:
+ """
+ Decompresses a type library file to a file on disk.
+
+ :param str path:
+ :param str output:
+ :rtype: bool
+ """
+ return core.BNTypeLibraryDecompressToFile(path, output)
+
+ @staticmethod
+ def decompress(path: str) -> str:
+ """
+ Decompresses a type library file to a string.
+
+ :param str path:
+ :rtype: str
+ """
+ return core.BNTypeLibraryDecompressToString(path)
+
+ @staticmethod
def load_from_file(path: str) -> Optional['TypeLibrary']:
"""
Loads a finalized type library instance from file