How to write a Loader that has to decode, decrypt, or decompress the data? #7186
-
I'm sure this is a very basic question but it's hard to grep the repo to find an example and Googling for Loader dev docs finds a bunch of blog posts from 2020 of varying quality. Is there an official intro? I've written a bunch of Loaders, all pretty simple. Most are like this:
The I've got more complex loaders but none that don't take flat parts the file. Which ways do Loader writers use when they have to transform the bytes from the file to get them into a MemoryBlock? Which built-in ones to look at? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You just use the version of |
Beta Was this translation helpful? Give feedback.
You just use the version of
MemoryBlockUtils.createInitializedBlock()
that takes anInputStream
rather than aFileBytes
. TheOmfLoader
is a built-in example:ghidra/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/OmfLoader.java
Lines 131 to 146 in 39f388f