diff options
| author | Peter LaFosse <peter@vector35.com> | 2023-04-05 13:54:44 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2023-04-18 08:43:10 -0400 |
| commit | 35adefaa9d1ecf5e8c09a787dbd6bda1d1a49325 (patch) | |
| tree | f4c313f35ec1ab5e0534f525b6850acc77170a82 /python/typelibrary.py | |
| parent | 69e005b330a1c71978096e9f98f625e481725a14 (diff) | |
Add APIs for dumping the contents of TypeLibraries
Diffstat (limited to 'python/typelibrary.py')
| -rw-r--r-- | python/typelibrary.py | 21 |
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 |
