encode uint32_t
| 231 | |
| 232 | // encode uint32_t |
| 233 | uint8_t *decode(uint8_t *buf, uint32_t &value) { |
| 234 | value = ((buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | (buf[3])); |
| 235 | return (buf + 4); |
| 236 | } |
| 237 | |
| 238 | // encode byte array |
| 239 | uint8_t *encode(uint8_t *buf, uint8_t *bufArray, int size) { |
no outgoing calls