While it is possible to essentially pass a byte array to an external call (say just as a char array) I believe the documentation states the only variable length data that can be returned from calls are strings .
While I am sure I could hex encode binary data send it to 010 then decode it and write it out to the existing file in memory? Not efficient but might work. The other option seems I could have the external lib write it to an external file, then open that file in 010 then run a partial template against it (as I don’t think I can access another file from a current template).
The use case I recently ran into was parsing onedrive log files. After a header they contain records of the activity the onedrive client has done. I figured write a template make life easier. The issue is sometimes the records are compressed in the file after the header as a big gzip/zlib stream of bytes. I can get these bytes easy enough, and heck I can include the 010 editor’s GZip template against them perfectly, but I can’t actually access that uncompressed data to make meaningful template output.
In the end I just wrote a full fledged program to do so based on the work of some others, but it seemed like a miss where the only real choice would be to implement gzip in 010 itself.
The other option would be if 010 had plugin/extension support but given the complexity of that I doubt it is coming any time soon.