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

Multiple values (arrays) in one data field in IoText protocol v0 #24

Closed bieli closed 5 months ago

bieli commented 5 months ago

General idea overview

For example, you want to send/encode array of integers like this with IoTextdata protocol:

[-611,611,-583,592,-587,-605,-590,-649,620]

You can optimize array syntax to below:

-611+611-583+592-587-605-590-649+620

Idea for data type is:

Optimization for highest integers values

Additional optimization idea for integers -> convert values to HEX, for values > 999999, we can decrease -1 character per integer value.

Integer example values:

-999999+123123123-555+1234567890

Converted to HEX values:

-F423F+756B5B3-22B+499602D2
bieli commented 5 months ago

PR: https://github.com/bieli/IoText-data-protocol/pull/25

bieli commented 5 months ago

PR: #25

Merged implementation for list of values.