encode uint32_t
| 148 | |
| 149 | // encode uint32_t |
| 150 | uint8_t *decode(uint8_t *buf, uint32_t &value) { |
| 151 | value = ((buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | (buf[3])); |
| 152 | return (buf + 4); |
| 153 | } |
| 154 | |
| 155 | // encode byte array |
| 156 | uint8_t *encode(uint8_t *buf, uint8_t *bufArray, int size) { |