diff options
Diffstat (limited to 'typelibrary.cpp')
| -rw-r--r-- | typelibrary.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/typelibrary.cpp b/typelibrary.cpp index 4a794805..5c81705f 100644 --- a/typelibrary.cpp +++ b/typelibrary.cpp @@ -14,6 +14,21 @@ TypeLibrary::TypeLibrary(Ref<Architecture> arch, const std::string& name) } +bool TypeLibrary::DecompressToFile(const std::string& path, const std::string& output) +{ + return BNTypeLibraryDecompressToFile(path.c_str(), output.c_str()); +} + + +std::string TypeLibrary::Decompress(const std::string& path) +{ + auto str = BNTypeLibraryDecompressToString(path.c_str()); + std::string result = str; + BNFreeString(str); + return result; +} + + Ref<TypeLibrary> TypeLibrary::LoadFromFile(const std::string& path) { return new TypeLibrary(BNLoadTypeLibraryFromFile(path.c_str())); |
