One way of getting binary data into the compiler is with -resource path/to/file.ext@alias and get it back with haxe.Resource.getBytes('alias') at runtime.
Or you could use a macro that allows you to write something like:
var bof = Literal.bytes(0x00, 0x06, 0x05, 0x00, ...);
That way you can hide all the noise of filling the bytes
Yeah I was thinking about using resource but seemed too convoluted for such short sequences of bytes. And it helps in the code for me to see the byte layout. I like the macro idea (actually I was searching through tink earlier to see if you might’ve made one for this already). It seems to me haxe should have this built-in. I end up doing a lot of bitwise stuff and find its harder to do in haxe than in a lot of other languages.
Of course. The point of using a string is to have less noise, i.e. neither the , nor the 0x carry any information. But using the first notation inherently allows for formatting, hence I suggested allowing the same with strings.