lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




Le ven. 25 oct. 2019 à 06:33, bil til <flyer31@googlemail.com> a écrit :
The following table shows the Type byte, the number of follow-up bytes (e.
g. 0B, 4B, 8B, …), and the meaning:
0x00..0x64 0B int number 0…100
0x70..0x74 1/2/4/8/16B  number int8/int16/int32/int64/int128
0x71..0x74 2/4/8/16B  number float16/float32/float64/float128
0x81...0xD4 nB string with n Bytes, n=1…100
There's a collision of code prefixes 0x71..0x74 for int16..int128 and float16..float128
I suppose that you use instead either:
- 0x78..0x7C for int8..int128, so that 0x71..0x74 remain for float16..float128; or
- 0x79..0x7C for float16..float128 , so that 0x70..0x74 remain for  int8..int128.
Now what is missing are the float48 and float80 formats (used in native FPUs for specific processors; float80 is very common in all x86 and x64 configurations); there may be other useful formats for ARM or ARM64 (many IoT applicances, routers, smartphones and embedded controlers); smaller controlers (that could benefit the most of binary compressed data) have their own formats too (e.g. the Intel 8050 series, used in many industrial embedded controlers)