bieli / IoText-data-protocol

Internet of Things data protocol - simplistic text and CSV-friendly IoT data protocol. Options: Schema-less, schema+versioning, building deltas for data values. Easy to re-use.
Apache License 2.0
0 stars 2 forks source link

Optimize chars in natural integer numbers with HEX values (special sign upper "I" letter for hexadecimals instead of lower "i" letter for integer) #21

Open bieli opened 8 months ago

bieli commented 8 months ago

Example of generic IoText data protocol row:

t|3900267526042,d|meter_01,m|distance_mm=i:12345

after DEC to HEX conversion, we have -1 byte per one record (data field) in this example

t|3900267526042,d|meter_01,m|distance_mm=I:3039

For this operation it will be good to use instead of a lower i letter in the record, an upper case I letter - it will be an identifier for HEX integer values.

It will be an important aspect for values as bytes optimization when we have _0 or _00 data records in one row. We will have _0 or _00 less bytes in one row, which is not too bad.

bieli commented 5 months ago

"I" upper letter is reserved for this feature #24 - list of values in one metric