In a
perfect world, roByteArray should get couple of pack/unpack methods:
function ifByteArray.unpack(fmt as String) as roArray
function ifByteArray.pack(fmt as String, data as roArray) as Boolean
where fmt = sequence of format characters:
fmt BrSc type Size, octets
- --------- ------------
c String 1
b Integer 1
h Integer 2
i Integer 4
f Float 4 in IEEE 754
d Double 4 in IEEE 754
s String zero-terminated utf-8
? Boolean 1
I keep getting those urges to sketch a BSc function unpacking 4-byte float but not having a way to inject
NaN,
minus 0 and
+/-Infinity values (luckily) keeps me from doing it.