I am working on a project where I will need to publish approx 200 bytes of data.
If I encode this 200 bytes of data using hex characters, It will be take a minimum of 400 characters.
That means it will take 2 Particle.publishes in order to send my data, since each Particle.publish() is limited to a maximum size payload of 255 characters.
Alternatively, I was wondering if it would be feasible to use a base-255 encoding scheme (is there a name for this?) instead of a base 16 encoding scheme (i.e. hex) to encode the data. That would mean that I could represent each byte by a single character, though I would be using “weird” characters to accomplish this.
Characters such as ±◘╚♪♀♂◙○◘•♠♣♦♥☻☺
Would this work? Would there be anything in the OSI comm layers preventing this from working (i.e. special characters being scrubbed/altered/deleted as they pass from my app to my server via the Particle Cloud)?
@jaza_tom, “base 255” would be pure 8-bit binary! The publish restricts the payload to pure ASCII so an efficient conversion is Base64 which would make your payload about 267 bytes long. You can find the Base64RK library in the Web IDE to make things easy.