Hello Robert,
Thanks for the reply.
I have started to write a viewer/editor for the binary format in javascript which runs in the browser. The file format has more than cutting and moving commands. It also provides information to the machine GUI. Basically I have to do a lot of rearranging before writing the final file. To top it all, the binary has to be scrambled with magic numbers. This will done to a byte array before writing.
My problem is that I don’t know how to write binary output from the post processor.
I have tried to call the static method BinaryFile.saveBinary(path, data); but I get an error: … ReferenceError: BinaryFile is not defined ...
It’s the same if I use for example the XMLHttpRequest class.
It seems like I can’t get access to those classes. However, calling the methods of the FileSystem class works. I haven’t gone any further in my testing
So basically this is what I’m trying to do.
- Creating and arranging a uint8 byte array (should be possible with standard javascript)
- Save the array as a binary file (I don’t know how to do this from the post processor, this is my problem).
In other words: -- How do I save a uint8 array as a binary file?
Your help is appreciated
Best regards,
Samuel W.