9 static const char rcsid[] __attribute__((used)) =
"$Id: MessagePack.cpp 1911 2017-09-02 17:37:35Z sella $";
11 #include "MessagePack.h"
19 using namespace sella::util;
21 MessagePack::MessagePack(uint8_t * & buffer, uint32_t & length, uint32_t offset, uint32_t unused,
bool resizable) THROWS(MemoryException) :
22 buffer_memory(buffer),
23 buffer_length(length),
25 buffer_offset(offset),
26 buffer_unused(unused),
31 uint32_t MessagePack::memcpy(uint8_t * buffer, uint32_t length, uint32_t offset) NO_EXCEPTIONS {
32 uint32_t bytes = this->bytes(offset);
34 if (bytes > length ) {
37 ::memcpy(buffer, &(this->buffer_memory[this->buffer_offset + offset]), bytes);
42 int MessagePack::compare(uint32_t offset,
const char * value, uint32_t length) NO_EXCEPTIONS {
43 if (UNLIKELY(offset == UINT32_MAX)) {
44 return MessagePack::TYPE_UNKNOWN;
46 offset += this->buffer_offset;
48 const mpack_table_t * index = &(MessagePack::mpack_table[this->buffer_memory[offset]]);
49 uint32_t bytes = __builtin_bswap32(*(reinterpret_cast<uint32_t *>(&(this->buffer_memory[offset + 1]))));
51 bytes = ((bytes & index->bytes_zero) >> index->shift_swap) + (this->buffer_memory[offset] & index->bytes_mask);
53 uint32_t minimum = length ^ ((bytes ^ length) & -(bytes < length));
54 int compare = ::memcmp(value, &(this->buffer_memory[offset + index->bytes_base]), minimum);
56 return (compare != 0) ? compare : ((bytes == length) ? 0 : ((length > bytes) ? 1 : -1));
59 int MessagePack::compare(uint32_t offset,
const char * value) NO_EXCEPTIONS {
60 if (UNLIKELY(offset == UINT32_MAX)) {
66 switch (this->buffer_memory[this->buffer_offset + offset]) {
67 case 0xa0:
case 0xa1:
case 0xa2:
case 0xa3:
case 0xa4:
case 0xa5:
case 0xa6:
case 0xa7:
68 case 0xa8:
case 0xa9:
case 0xaa:
case 0xab:
case 0xac:
case 0xad:
case 0xae:
case 0xaf:
69 case 0xb0:
case 0xb1:
case 0xb2:
case 0xb3:
case 0xb4:
case 0xb5:
case 0xb6:
case 0xb7:
70 case 0xb8:
case 0xb9:
case 0xba:
case 0xbb:
case 0xbc:
case 0xbd:
case 0xbe:
case 0xbf:
71 if ((bytes = (this->buffer_memory[this->buffer_offset + offset] & 0x1f)) > 0) {
72 if ((comparison = ::strncmp(reinterpret_cast<const char *>(&(this->buffer_memory[this->buffer_offset + offset + 1])), value, bytes)) == 0) {
73 if (value[bytes] != 0) {
85 if ((bytes = this->buffer_memory[this->buffer_offset + offset + 1]) > 0) {
86 if ((comparison = ::strncmp(reinterpret_cast<const char *>(&(this->buffer_memory[this->buffer_offset + offset + 2])), value, bytes)) == 0) {
87 if (value[bytes] != 0) {
99 if ((bytes = __builtin_bswap16(*(reinterpret_cast<const uint16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))))) > 0) {
100 if ((comparison = ::strncmp(reinterpret_cast<const char *>(&(this->buffer_memory[this->buffer_offset + offset + 3])), value, bytes)) == 0) {
101 if (value[bytes] != 0) {
113 if ((bytes = __builtin_bswap32(*(reinterpret_cast<const uint32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))))) > 0) {
114 if ((comparison = ::strncmp(reinterpret_cast<const char *>(&(this->buffer_memory[this->buffer_offset + offset + 5])), value, bytes)) == 0) {
115 if (value[bytes] != 0) {
129 int MessagePack::compare(uint32_t offset,
const std::string & value) NO_EXCEPTIONS {
130 return compare(offset, value.data(), (uint32_t) value.size());
133 int MessagePack::compare(uint32_t offset,
bool value) NO_EXCEPTIONS {
134 if (UNLIKELY(offset == UINT32_MAX)) {
138 switch (this->buffer_memory[this->buffer_offset + offset]) {
140 return value ? -1 : 0;
143 return value ? 0 : 1;
148 int MessagePack::compare(uint32_t offset, int64_t value) NO_EXCEPTIONS {
149 if (UNLIKELY(offset == UINT32_MAX)) {
155 switch (this->buffer_memory[this->buffer_offset + offset]) {
157 return static_cast<int64_t
>(this->buffer_memory[this->buffer_offset + offset + 1]) - value;
160 if (__builtin_bswap16(static_cast<uint16_t>(*(reinterpret_cast<uint16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))))) <= INT16_MAX) {
161 return static_cast<int64_t
>(__builtin_bswap16(static_cast<uint16_t>(*(reinterpret_cast<uint16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))))) - value;
166 if (__builtin_bswap32(static_cast<uint32_t>(*(reinterpret_cast<uint32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))))) <= INT32_MAX) {
167 return static_cast<int64_t
>(__builtin_bswap32(static_cast<uint32_t>(*(reinterpret_cast<uint32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))))) - value;
172 if (__builtin_bswap64(static_cast<uint64_t>(*(reinterpret_cast<uint64_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))))) <= INT64_MAX) {
173 return static_cast<int64_t
>(__builtin_bswap64(static_cast<uint64_t>(*(reinterpret_cast<uint64_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))))) - value;
178 return static_cast<int64_t
>(this->buffer_memory[this->buffer_offset + offset + 1]) - value;
181 read16 = __builtin_bswap16(*(reinterpret_cast<int16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))));
183 return static_cast<int64_t
>(read16) - value;
186 read32 = __builtin_bswap32(*(reinterpret_cast<int32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))));
188 return static_cast<int64_t
>(read32) - value;
191 return static_cast<int64_t
>(__builtin_bswap64(static_cast<int64_t>(*(reinterpret_cast<int64_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))))) - value;
193 case 0xe0:
case 0xe1:
case 0xe2:
case 0xe3:
case 0xe4:
case 0xe5:
case 0xe6:
case 0xe7:
194 case 0xe8:
case 0xe9:
case 0xea:
case 0xeb:
case 0xec:
case 0xed:
case 0xee:
case 0xef:
195 case 0xf0:
case 0xf1:
case 0xf2:
case 0xf3:
case 0xf4:
case 0xf5:
case 0xf6:
case 0xf7:
196 case 0xf8:
case 0xf9:
case 0xfa:
case 0xfb:
case 0xfc:
case 0xfd:
case 0xfe:
case 0xff:
197 return static_cast<int64_t
>(this->buffer_memory[this->buffer_offset + offset]) - value;
200 if ((this->buffer_memory[this->buffer_offset + offset] & 0x7f) == this->buffer_memory[this->buffer_offset + offset]) {
201 return static_cast<int64_t
>(this->buffer_memory[this->buffer_offset + offset] & 0x7f) - value;
207 int MessagePack::compare(uint32_t offset, uint64_t value) NO_EXCEPTIONS {
211 int MessagePack::compare(uint32_t offset,
double value) NO_EXCEPTIONS {
215 bool MessagePack::update(uint32_t offset,
MessagePack & other, uint32_t source) NO_EXCEPTIONS {
216 uint32_t exist = this->bytes(offset);
217 uint32_t bytes = other.bytes(source);
220 if (exist != bytes) {
222 if (UNLIKELY(this->expand(offset, bytes - exist) ==
false)) {
226 if (UNLIKELY(this->reduce(offset, exist - bytes) ==
false)) {
231 ::memcpy(&(this->buffer_memory[this->buffer_offset + offset]), &(other.buffer_memory[other.buffer_offset + source]), bytes);
236 uint32_t MessagePack::create(uint32_t offset) NO_EXCEPTIONS {
237 if (UNLIKELY(offset == UINT32_MAX)) {
241 if (this->buffer_unused == 0) {
242 if (this->expand(offset, 1) ==
false) {
246 this->buffer_memory[this->buffer_offset + offset] = 0xc0;
247 this->buffer_unused -= 1;
253 bool MessagePack::verify(
void) NO_EXCEPTIONS {
254 uint32_t index = this->buffer_offset;
255 uint32_t length = this->buffer_length - this->buffer_unused;
263 if (index == length) {
264 if ((this->buffer_length - this->buffer_offset - this->buffer_unused) > 0) {
271 while (index < length) {
272 switch (this->buffer_memory[index]) {
273 case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
274 case 0x88:
case 0x89:
case 0x8a:
case 0x8b:
case 0x8c:
case 0x8d:
case 0x8e:
case 0x8f:
275 count[depth] = (this->buffer_memory[index] & 0x0f) << 1;
276 bytes[depth] =
static_cast<uint64_t
>(index) << 32;
280 if (UNLIKELY((depth = depth + 1) == 64)) {
283 index = index + size;
285 if (UNLIKELY(index > length)) {
290 case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
291 case 0x98:
case 0x99:
case 0x9a:
case 0x9b:
case 0x9c:
case 0x9d:
case 0x9e:
case 0x9f:
292 count[depth] = this->buffer_memory[index] & 0x0f;
293 bytes[depth] =
static_cast<uint64_t
>(index) << 32;
297 if (UNLIKELY((depth = depth + 1) == 64)) {
300 index = index + size;
302 if (UNLIKELY(index > length)) {
307 case 0xa0:
case 0xa1:
case 0xa2:
case 0xa3:
case 0xa4:
case 0xa5:
case 0xa6:
case 0xa7:
308 case 0xa8:
case 0xa9:
case 0xaa:
case 0xab:
case 0xac:
case 0xad:
case 0xae:
case 0xaf:
309 case 0xb0:
case 0xb1:
case 0xb2:
case 0xb3:
case 0xb4:
case 0xb5:
case 0xb6:
case 0xb7:
310 case 0xb8:
case 0xb9:
case 0xba:
case 0xbb:
case 0xbc:
case 0xbd:
case 0xbe:
case 0xbf:
311 size = 1 + (this->buffer_memory[index] & 0x1f);
313 index = index + size;
315 if (UNLIKELY(index > length)) {
323 index = index + size;
325 if (UNLIKELY(index > length)) {
337 index = index + size;
339 if (UNLIKELY(index > length)) {
345 if (UNLIKELY((index + 2) > length)) {
348 size = 2 + this->buffer_memory[index + 1];
350 index = index + size;
352 if (UNLIKELY(index > length)) {
358 if (UNLIKELY((index + 3) > length)) {
361 size = 3 + __builtin_bswap16(*(reinterpret_cast<const uint16_t *>(&(this->buffer_memory[index + 1]))));
363 index = index + size;
365 if (UNLIKELY(index > length)) {
371 if (UNLIKELY((index + 5) > length)) {
374 size = 5 + __builtin_bswap32(*(reinterpret_cast<const uint32_t *>(&(this->buffer_memory[index + 1]))));
376 index = index + size;
378 if (UNLIKELY(index > length)) {
384 if (UNLIKELY((index + 3) > length)) {
387 size = 3 + this->buffer_memory[index + 1];
389 index = index + size;
391 if (UNLIKELY(index > length)) {
397 if (UNLIKELY((index + 4) > length)) {
400 size = 4 + __builtin_bswap16(*(reinterpret_cast<const uint16_t *>(&(this->buffer_memory[index + 1]))));
402 index = index + size;
404 if (UNLIKELY(index > length)) {
410 if (UNLIKELY((index + 6) > length)) {
413 size = 6 + __builtin_bswap32(*(reinterpret_cast<const uint32_t *>(&(this->buffer_memory[index + 1]))));
415 index = index + size;
417 if (UNLIKELY(index > length)) {
425 index = index + size;
427 if (UNLIKELY(index > length)) {
435 index = index + size;
437 if (UNLIKELY(index > length)) {
445 index = index + size;
447 if (UNLIKELY(index > length)) {
455 index = index + size;
457 if (UNLIKELY(index > length)) {
465 index = index + size;
467 if (UNLIKELY(index > length)) {
475 index = index + size;
477 if (UNLIKELY(index > length)) {
485 index = index + size;
487 if (UNLIKELY(index > length)) {
495 index = index + size;
497 if (UNLIKELY(index > length)) {
505 index = index + size;
507 if (UNLIKELY(index > length)) {
515 index = index + size;
517 if (UNLIKELY(index > length)) {
525 index = index + size;
527 if (UNLIKELY(index > length)) {
535 index = index + size;
537 if (UNLIKELY(index > length)) {
545 index = index + size;
547 if (UNLIKELY(index > length)) {
555 index = index + size;
557 if (UNLIKELY(index > length)) {
565 index = index + size;
567 if (UNLIKELY(index > length)) {
573 if (UNLIKELY((index + 2) > length)) {
576 size = 2 + this->buffer_memory[index + 1];
578 index = index + size;
580 if (UNLIKELY(index > length)) {
586 if (UNLIKELY((index + 3) > length)) {
589 size = 3 + __builtin_bswap16(*(reinterpret_cast<const uint16_t *>(&(this->buffer_memory[index + 1]))));
591 index = index + size;
593 if (UNLIKELY(index > length)) {
599 if (UNLIKELY((index + 5) > length)) {
602 size = 5 + __builtin_bswap32(*(reinterpret_cast<const uint32_t *>(&(this->buffer_memory[index + 1]))));
604 index = index + size;
606 if (UNLIKELY(index > length)) {
612 if (UNLIKELY((index + 3) > length)) {
615 count[depth] = __builtin_bswap16(*(reinterpret_cast<const uint16_t *>(&(this->buffer_memory[index + 1]))));
616 bytes[depth] =
static_cast<uint64_t
>(index) << 32;
620 if (UNLIKELY((depth = depth + 1) == 64)) {
623 index = index + size;
625 if (UNLIKELY(index > length)) {
631 if (UNLIKELY((index + 5) > length)) {
634 count[depth] = __builtin_bswap32(*(reinterpret_cast<const uint32_t *>(&(this->buffer_memory[index + 1]))));
635 bytes[depth] =
static_cast<uint64_t
>(index) << 32;
639 if (UNLIKELY((depth = depth + 1) == 64)) {
642 index = index + size;
644 if (UNLIKELY(index > length)) {
650 if (UNLIKELY((index + 3) > length)) {
653 count[depth] = __builtin_bswap16(*(reinterpret_cast<const uint16_t *>(&(this->buffer_memory[index + 1])))) << 1;
654 bytes[depth] =
static_cast<uint64_t
>(index) << 32;
658 if (UNLIKELY((depth = depth + 1) == 64)) {
661 index = index + size;
663 if (UNLIKELY(index > length)) {
669 if (UNLIKELY((index + 5) > length)) {
672 count[depth] = __builtin_bswap32(*(reinterpret_cast<const uint32_t *>(&(this->buffer_memory[index + 1])))) << 1;
673 bytes[depth] =
static_cast<uint64_t
>(index) << 32;
677 if (UNLIKELY((depth = depth + 1) == 64)) {
680 index = index + size;
682 if (UNLIKELY(index > length)) {
687 case 0xe0:
case 0xe1:
case 0xe2:
case 0xe3:
case 0xe4:
case 0xe5:
case 0xe6:
case 0xe7:
688 case 0xe8:
case 0xe9:
case 0xea:
case 0xeb:
case 0xec:
case 0xed:
case 0xee:
case 0xef:
689 case 0xf0:
case 0xf1:
case 0xf2:
case 0xf3:
case 0xf4:
case 0xf5:
case 0xf6:
case 0xf7:
690 case 0xf8:
case 0xf9:
case 0xfa:
case 0xfb:
case 0xfc:
case 0xfd:
case 0xfe:
case 0xff:
693 index = index + size;
695 if (UNLIKELY(index > length)) {
703 index = index + size;
705 if (UNLIKELY(index > length)) {
711 if ((bytes[depth - 1] & 0x00000000ffffffff) > 0) {
712 for (uint32_t i = 0; i < depth; i++) {
716 while ((count[depth - 1] -= 1) == 0) {
717 if ((depth -= 1) == 0) {
722 for (uint32_t i = 0; i < depth; i++) {
732 while ((count[depth - 1] -= 1) == 0) {
733 if ((depth -= 1) == 0) {
741 uint32_t MessagePack::create(uint32_t offset,
const char * index) NO_EXCEPTIONS {
742 return this->search(offset, index, ::strlen(index),
true);
745 uint32_t MessagePack::select(uint32_t offset,
const char * index) NO_EXCEPTIONS {
746 return this->search(offset, index, ::strlen(index),
false);
749 uint32_t MessagePack::create(uint32_t offset,
MessagePack & other, uint32_t source) NO_EXCEPTIONS {
750 if (UNLIKELY(offset == UINT32_MAX)) {
751 return MessagePack::TYPE_UNKNOWN;
753 const mpack_table_t * index = &(MessagePack::mpack_table[other.buffer_memory[other.buffer_offset + source]]);
755 uint32_t value = __builtin_bswap32(*(reinterpret_cast<uint32_t *>(&(this->buffer_memory[offset + 1]))));
756 uint32_t bytes = ((value & index->bytes_zero) >> index->shift_swap) + (other.buffer_memory[other.buffer_offset + source] & index->bytes_mask);
758 return this->search(offset, reinterpret_cast<const char *>(&(other.buffer_memory[other.buffer_offset + source + index->bytes_base])), bytes,
true);
761 uint32_t MessagePack::create(uint32_t offset,
const uint8_t * buffer, uint32_t length) NO_EXCEPTIONS {
762 if (UNLIKELY((offset == UINT32_MAX) || (length < 1))) {
768 case 0xa0:
case 0xa1:
case 0xa2:
case 0xa3:
case 0xa4:
case 0xa5:
case 0xa6:
case 0xa7:
769 case 0xa8:
case 0xa9:
case 0xaa:
case 0xab:
case 0xac:
case 0xad:
case 0xae:
case 0xaf:
770 case 0xb0:
case 0xb1:
case 0xb2:
case 0xb3:
case 0xb4:
case 0xb5:
case 0xb6:
case 0xb7:
771 case 0xb8:
case 0xb9:
case 0xba:
case 0xbb:
case 0xbc:
case 0xbd:
case 0xbe:
case 0xbf:
772 bytes = buffer[0] & 0x1f;
775 return this->search(offset, reinterpret_cast<const char *>(&(buffer[1])), bytes,
true);
783 return this->search(offset, reinterpret_cast<const char *>(&(buffer[2])), bytes,
true);
788 bytes = __builtin_bswap16(*(reinterpret_cast<const uint16_t *>(&(buffer[1]))));
791 return this->search(offset, reinterpret_cast<const char *>(&(buffer[3])), bytes,
true);
796 bytes = __builtin_bswap32(*(reinterpret_cast<const uint32_t *>(&(buffer[1]))));
799 return this->search(offset, reinterpret_cast<const char *>(&(buffer[5])), bytes,
true);
806 uint32_t MessagePack::select(uint32_t offset,
const uint8_t * buffer, uint32_t length) NO_EXCEPTIONS {
807 if (UNLIKELY((offset == UINT32_MAX) || (length < 1))) {
813 case 0xa0:
case 0xa1:
case 0xa2:
case 0xa3:
case 0xa4:
case 0xa5:
case 0xa6:
case 0xa7:
814 case 0xa8:
case 0xa9:
case 0xaa:
case 0xab:
case 0xac:
case 0xad:
case 0xae:
case 0xaf:
815 case 0xb0:
case 0xb1:
case 0xb2:
case 0xb3:
case 0xb4:
case 0xb5:
case 0xb6:
case 0xb7:
816 case 0xb8:
case 0xb9:
case 0xba:
case 0xbb:
case 0xbc:
case 0xbd:
case 0xbe:
case 0xbf:
817 bytes = buffer[0] & 0x1f;
820 return this->search(offset, reinterpret_cast<const char *>(&(buffer[1])), bytes,
false);
828 return this->search(offset, reinterpret_cast<const char *>(&(buffer[2])), bytes,
false);
833 bytes = __builtin_bswap16(*(reinterpret_cast<const uint16_t *>(&(buffer[1]))));
836 return this->search(offset, reinterpret_cast<const char *>(&(buffer[3])), bytes,
false);
841 bytes = __builtin_bswap32(*(reinterpret_cast<const uint32_t *>(&(buffer[1]))));
844 return this->search(offset, reinterpret_cast<const char *>(&(buffer[5])), bytes,
false);
851 uint32_t MessagePack::select(uint32_t offset,
MessagePack & other, uint32_t source) NO_EXCEPTIONS {
852 if (UNLIKELY(offset == UINT32_MAX)) {
857 switch (other.buffer_memory[other.buffer_offset + source]) {
858 case 0xa0:
case 0xa1:
case 0xa2:
case 0xa3:
case 0xa4:
case 0xa5:
case 0xa6:
case 0xa7:
859 case 0xa8:
case 0xa9:
case 0xaa:
case 0xab:
case 0xac:
case 0xad:
case 0xae:
case 0xaf:
860 case 0xb0:
case 0xb1:
case 0xb2:
case 0xb3:
case 0xb4:
case 0xb5:
case 0xb6:
case 0xb7:
861 case 0xb8:
case 0xb9:
case 0xba:
case 0xbb:
case 0xbc:
case 0xbd:
case 0xbe:
case 0xbf:
862 bytes = other.buffer_memory[other.buffer_offset + source] & 0x1f;
865 return this->search(offset, reinterpret_cast<const char *>(&(other.buffer_memory[other.buffer_offset + source + 1])), bytes,
false);
870 bytes = this->buffer_memory[other.buffer_offset + source + 1];
873 return this->search(offset, reinterpret_cast<const char *>(&(other.buffer_memory[other.buffer_offset + source + 2])), bytes,
false);
878 bytes = __builtin_bswap16(*(reinterpret_cast<const uint16_t *>(&(other.buffer_memory[other.buffer_offset + offset + 1]))));
881 return this->search(offset, reinterpret_cast<const char *>(&(other.buffer_memory[other.buffer_offset + source + 3])), bytes,
false);
886 bytes = __builtin_bswap32(*(reinterpret_cast<const uint32_t *>(&(other.buffer_memory[other.buffer_offset + offset + 1]))));
889 return this->search(offset, reinterpret_cast<const char *>(&(other.buffer_memory[other.buffer_offset + source + 5])), bytes,
false);
896 uint32_t MessagePack::remove(uint32_t offset,
const char * index) NO_EXCEPTIONS {
897 if ((offset = this->select(offset, index)) != UINT32_MAX) {
898 if (this->reduce(offset, this->bytes(offset)) ==
false) {
905 uint32_t MessagePack::search(uint32_t offset,
const char * index, uint32_t bytes,
bool create) NO_EXCEPTIONS {
906 if (UNLIKELY(offset == UINT32_MAX)) {
909 bool numerical =
false;
912 char string[bytes + 1];
917 for (uint32_t i = 0; i < bytes; i++) {
920 if (UNLIKELY((i == 0) || numerical)) {
923 string[n] = index[i];
929 if (UNLIKELY((i == 0) || numerical)) {
934 return this->search(this->select(offset,
string, n, create), index + i + 1, bytes - n - 1, create);
936 case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
939 number = number * 10;
940 number = number + (index[i] -
'0');
942 string[n] = index[i];
948 number = index[i] -
'0';
952 case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'H':
case 'I':
case 'J':
case 'K':
case 'L':
case 'M':
953 case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
case 'X':
case 'Y':
case 'Z':
954 if (UNLIKELY(numerical)) {
957 string[n] = index[i];
963 if (UNLIKELY((i == 0) || numerical)) {
968 return this->search(this->select(offset,
string, n, create), index + i + 1, bytes - n - 1, create);
971 if (UNLIKELY((i == 0) || (numerical ==
false))) {
975 if (*(index + 1) != 0) {
976 return this->select(offset, number, create);
978 return this->search(this->select(offset, number, create), index + i + 1, bytes - n - 1, create);
981 if (UNLIKELY(numerical)) {
984 string[n] = index[i];
989 case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
990 case 'n':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z':
991 if (UNLIKELY(numerical)) {
994 string[n] = index[i];
1000 if (UNLIKELY(numerical)) {
1003 string[n] = index[i];
1013 if (LIKELY(n > 0)) {
1014 if (UNLIKELY(numerical)) {
1019 return this->select(offset,
string, n, create);
1024 bool MessagePack::update(uint32_t offset,
const char * value) NO_EXCEPTIONS {
1025 return update(offset, value, (uint32_t) ::strlen(value));
1028 bool MessagePack::update(uint32_t offset,
const char * value, uint32_t length) NO_EXCEPTIONS {
1029 if (UNLIKELY(offset == UINT32_MAX)) {
1032 uint32_t bytes = length;
1033 uint32_t exist = this->bytes(offset);
1038 switch (CLZ32(bytes)) {
1039 case 32:
case 31:
case 30:
case 29:
case 28:
1043 case 27:
case 26:
case 25:
case 24:
1047 case 23:
case 22:
case 21:
case 20:
1048 case 19:
case 18:
case 17:
case 16:
1052 case 15:
case 14:
case 13:
case 12:
1053 case 11:
case 10:
case 9:
case 8:
1054 case 7:
case 6:
case 5:
case 4:
1055 case 3:
case 2:
case 1:
case 0:
1064 if (exist != (1 + zeros + bytes)) {
1065 if (exist > (1 + zeros + bytes)) {
1066 if (UNLIKELY(this->reduce(offset, exist - (1 + zeros + bytes)) ==
false)) {
1070 if (UNLIKELY(this->expand(offset, (1 + zeros + bytes) - exist) ==
false)) {
1079 this->buffer_memory[this->buffer_offset + offset] = 0xa0 + bytes;
1083 this->buffer_memory[this->buffer_offset + offset] = 0xd9;
1084 this->buffer_memory[this->buffer_offset + offset + 1] = bytes;
1088 this->buffer_memory[this->buffer_offset + offset] = 0xda;
1089 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<uint16_t>(bytes));
1093 this->buffer_memory[this->buffer_offset + offset] = 0xdb;
1094 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<uint32_t>(bytes));
1097 ::memcpy(&(this->buffer_memory[this->buffer_offset + offset + zeros + 1]), value, bytes);
1102 bool MessagePack::update(uint32_t offset,
const std::string & value) NO_EXCEPTIONS {
1103 return update(offset, value.data(), (uint32_t) value.size());
1106 bool MessagePack::update(uint32_t offset,
bool value) NO_EXCEPTIONS {
1107 if (UNLIKELY(offset == UINT32_MAX)) {
1110 uint32_t exist = this->bytes(offset);
1114 if (UNLIKELY(this->reduce(offset, exist - 1) ==
false)) {
1121 this->buffer_memory[this->buffer_offset + offset] = 0xc3;
1123 this->buffer_memory[this->buffer_offset + offset] = 0xc2;
1128 bool MessagePack::update(uint32_t offset, int64_t value) NO_EXCEPTIONS {
1129 if (UNLIKELY(offset == UINT32_MAX)) {
1132 uint32_t exist = this->bytes(offset);
1137 switch (CLZ64(value)) {
1138 case 64:
case 63:
case 62:
case 61:
case 60:
case 59:
case 58:
case 57:
1142 case 56:
case 55:
case 54:
case 53:
case 52:
case 51:
case 50:
case 49:
1147 case 47:
case 46:
case 45:
case 44:
1148 case 43:
case 42:
case 41:
case 40:
1149 case 39:
case 38:
case 37:
case 36:
1150 case 35:
case 34:
case 33:
1159 if (value < INT8_MIN) {
1160 if (value < INT16_MIN) {
1161 if (value < INT32_MIN) {
1176 if (exist > (1 + zeros)) {
1177 if (UNLIKELY(this->reduce(offset, exist - (1 + zeros)) ==
false)) {
1181 if (exist < (1 + zeros)) {
1182 if (UNLIKELY(this->expand(offset, (1 + zeros) - exist) ==
false)) {
1192 this->buffer_memory[this->buffer_offset + offset] =
static_cast<int8_t
>(value) | 0xe0;
1194 this->buffer_memory[this->buffer_offset + offset] =
static_cast<int8_t
>(value);
1199 this->buffer_memory[this->buffer_offset + offset + 1] =
static_cast<int8_t
>(value);
1200 this->buffer_memory[this->buffer_offset + offset] = 0xd0;
1205 *(
reinterpret_cast<int16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<int16_t>(value));
1206 this->buffer_memory[this->buffer_offset + offset] = 0xd1;
1211 *(
reinterpret_cast<int32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<int32_t>(value));
1212 this->buffer_memory[this->buffer_offset + offset] = 0xd2;
1217 *(
reinterpret_cast<int64_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap64(static_cast<int64_t>(value));
1218 this->buffer_memory[this->buffer_offset + offset] = 0xd3;
1225 bool MessagePack::update(uint32_t offset, uint64_t value) NO_EXCEPTIONS {
1226 if (UNLIKELY(offset == UINT32_MAX)) {
1229 uint32_t exist = this->bytes(offset);
1233 switch (CLZ64(value)) {
1234 case 64:
case 63:
case 62:
case 61:
case 60:
case 59:
case 58:
case 57:
1242 case 55:
case 54:
case 53:
case 52:
1243 case 51:
case 50:
case 49:
case 48:
1247 case 47:
case 46:
case 45:
case 44:
1248 case 43:
case 42:
case 41:
case 40:
1249 case 39:
case 38:
case 37:
case 36:
1250 case 35:
case 34:
case 33:
case 32:
1259 if (exist > (1 + zeros)) {
1260 if (UNLIKELY(this->reduce(offset, exist - (1 + zeros)) ==
false)) {
1264 if (exist < (1 + zeros)) {
1265 if (UNLIKELY(this->expand(offset, (1 + zeros) - exist) ==
false)) {
1274 this->buffer_memory[this->buffer_offset + offset] =
static_cast<uint8_t
>(value);
1279 this->buffer_memory[this->buffer_offset + offset + 1] =
static_cast<uint8_t
>(value);
1280 this->buffer_memory[this->buffer_offset + offset] = 0xcc;
1285 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<uint16_t>(value));
1286 this->buffer_memory[this->buffer_offset + offset] = 0xcd;
1291 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<uint32_t>(value));
1292 this->buffer_memory[this->buffer_offset + offset] = 0xce;
1297 *(
reinterpret_cast<uint64_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap64(static_cast<uint64_t>(value));
1298 this->buffer_memory[this->buffer_offset + offset] = 0xcf;
1306 double MessagePack::swap64(
double value) NO_EXCEPTIONS {
1313 v.i = __builtin_bswap64(v.i);
1318 bool MessagePack::update(uint32_t offset,
double value) NO_EXCEPTIONS {
1319 uint32_t exist = this->bytes(offset);
1323 if (UNLIKELY(this->reduce(offset, exist - 9) ==
false)) {
1327 if (UNLIKELY(this->expand(offset, 9 - exist) ==
false)) {
1332 value = this->swap64(value);
1334 ::memcpy(&(this->buffer_memory[this->buffer_offset + offset + 1]), &(value),
sizeof(
double));
1335 this->buffer_memory[this->buffer_offset + offset] = 0xcb;
1340 bool MessagePack::update(uint32_t offset) NO_EXCEPTIONS {
1341 if (UNLIKELY(offset == UINT32_MAX)) {
1344 uint32_t exist = this->bytes(offset);
1347 if (UNLIKELY(this->reduce(offset, exist - 1) ==
false)) {
1351 this->buffer_memory[this->buffer_offset + offset] = 0xc0;
1356 uint32_t MessagePack::select(uint32_t offset, uint32_t index,
bool create) NO_EXCEPTIONS {
1357 if (offset == UINT32_MAX) {
1360 uint32_t count = this->count(offset);
1362 if (count > index) {
1365 this->scan(offset, MessagePack::select_vector_callback, reinterpret_cast<void *>(&(parameters)));
1367 return parameters.value;
1371 return this->insert(offset, index, count);
1376 bool MessagePack::select_vector_callback(uint32_t i, uint32_t v,
void * p) {
1379 if (i == param->index) {
1387 uint32_t MessagePack::insert(uint32_t offset, uint32_t index, uint32_t count) NO_EXCEPTIONS {
1388 uint32_t bytes = this->bytes(offset);
1391 if (this->buffer_memory[this->buffer_offset + offset] == 0xc0) {
1392 if (UNLIKELY(this->recast(offset, 0x90) ==
false)) {
1397 if (UNLIKELY(this->expand(offset + bytes, index - count + 1) ==
false)) {
1400 ::memset(&(this->buffer_memory[this->buffer_offset + offset + bytes]), 0xc1, index - count + 1);
1402 if (UNLIKELY(this->resize(offset, index + 1) ==
false)) {
1403 this->reduce(offset + bytes, index - count + 1);
1407 return offset + bytes + index - count;
1410 uint32_t MessagePack::select(uint32_t offset,
const char * index, uint32_t bytes,
bool create) NO_EXCEPTIONS {
1411 if (UNLIKELY(offset == UINT32_MAX)) {
1416 this->scan(offset, MessagePack::select_object_callback, reinterpret_cast<void *>(&(parameters)));
1418 if ((parameters.value == UINT32_MAX) && create) {
1419 return this->insert(offset, index);
1422 return parameters.value;
1425 bool MessagePack::select_object_callback(uint32_t i, uint32_t v,
void * p) {
1428 if (param->instance->compare(i, param->index, param->bytes) == 0) {
1436 uint32_t MessagePack::insert(uint32_t offset,
const char * index) NO_EXCEPTIONS {
1437 if (UNLIKELY(offset == UINT32_MAX)) {
1440 uint32_t buffer = offset;
1442 uint32_t count = this->count(offset);
1443 uint32_t bytes = ::strlen(index);
1448 if (this->buffer_memory[this->buffer_offset + offset] == 0xc0) {
1449 if (UNLIKELY(this->recast(offset, 0x80) ==
false)) {
1456 if (UNLIKELY(this->recast(offset, 0x80) ==
false)) {
1462 if (UNLIKELY(this->recast(offset, 0xde) ==
false)) {
1468 if (UNLIKELY(this->recast(offset, 0xdf) ==
false)) {
1475 switch (CLZ32(bytes)) {
1476 case 32:
case 31:
case 30:
case 29:
case 28:
1480 case 27:
case 26:
case 25:
case 24:
1484 case 23:
case 22:
case 21:
case 20:
1485 case 19:
case 18:
case 17:
case 16:
1489 case 15:
case 14:
case 13:
case 12:
1490 case 11:
case 10:
case 9:
case 8:
1491 case 7:
case 6:
case 5:
case 4:
1492 case 3:
case 2:
case 1:
case 0:
1501 switch (this->buffer_memory[this->buffer_offset + offset]) {
1502 case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
1503 case 0x88:
case 0x89:
case 0x8a:
case 0x8b:
case 0x8c:
case 0x8d:
case 0x8e:
case 0x8f:
1504 if (UNLIKELY(this->expand(offset + 1, 2 + zeros + bytes) ==
false)) {
1511 if (UNLIKELY(this->expand(offset + 3, 2 + zeros + bytes) ==
false)) {
1518 if (UNLIKELY(this->expand(offset + 5, 2 + zeros + bytes) ==
false)) {
1530 this->buffer_memory[this->buffer_offset + buffer] = 0xa0 + bytes;
1534 this->buffer_memory[this->buffer_offset + buffer] = 0xd9;
1535 this->buffer_memory[this->buffer_offset + buffer + 1] = bytes;
1539 this->buffer_memory[this->buffer_offset + buffer] = 0xda;
1540 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + buffer + 1]))) = __builtin_bswap16(static_cast<uint16_t>(bytes));
1544 this->buffer_memory[this->buffer_offset + buffer] = 0xdb;
1545 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + buffer + 1]))) = __builtin_bswap32(static_cast<uint32_t>(bytes));
1548 ::memcpy(&(this->buffer_memory[this->buffer_offset + buffer + zeros + 1]), index, bytes);
1549 this->buffer_memory[this->buffer_offset + buffer + zeros + 1 + bytes] = 0xc0;
1552 if (UNLIKELY(this->resize(offset, count + 1) ==
false)) {
1555 return buffer + zeros + 1 + bytes;
1559 uint32_t MessagePack::decode_first(uint32_t offset) NO_EXCEPTIONS {
1560 if (UNLIKELY(offset == UINT32_MAX)) {
1564 switch (this->buffer_memory[this->buffer_offset + offset]) {
1565 case 0xa0:
case 0xa1:
case 0xa2:
case 0xa3:
case 0xa4:
case 0xa5:
case 0xa6:
case 0xa7:
1566 case 0xa8:
case 0xa9:
case 0xaa:
case 0xab:
case 0xac:
case 0xad:
case 0xae:
case 0xaf:
1567 case 0xb0:
case 0xb1:
case 0xb2:
case 0xb3:
case 0xb4:
case 0xb5:
case 0xb6:
case 0xb7:
1568 case 0xb8:
case 0xb9:
case 0xba:
case 0xbb:
case 0xbc:
case 0xbd:
case 0xbe:
case 0xbf:
1569 if ((this->buffer_memory[this->buffer_offset + offset] & 0x1f) > 0) {
1570 return this->buffer_memory[this->buffer_offset + offset + 1];
1575 if (this->buffer_memory[this->buffer_offset + offset + 1] > 0) {
1576 return this->buffer_memory[this->buffer_offset + offset + 2];
1581 if (__builtin_bswap16(*(reinterpret_cast<const uint16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))) > 0) {
1582 return this->buffer_memory[this->buffer_offset + offset + 3];
1587 if (__builtin_bswap32(*(reinterpret_cast<const uint32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))) > 0) {
1588 return this->buffer_memory[this->buffer_offset + offset + 5];
1596 bool MessagePack::decode(
char * buffer, uint32_t length, uint32_t offset) NO_EXCEPTIONS {
1597 if (UNLIKELY(offset == UINT32_MAX)) {
1602 switch (this->buffer_memory[this->buffer_offset + offset]) {
1603 case 0xa0:
case 0xa1:
case 0xa2:
case 0xa3:
case 0xa4:
case 0xa5:
case 0xa6:
case 0xa7:
1604 case 0xa8:
case 0xa9:
case 0xaa:
case 0xab:
case 0xac:
case 0xad:
case 0xae:
case 0xaf:
1605 case 0xb0:
case 0xb1:
case 0xb2:
case 0xb3:
case 0xb4:
case 0xb5:
case 0xb6:
case 0xb7:
1606 case 0xb8:
case 0xb9:
case 0xba:
case 0xbb:
case 0xbc:
case 0xbd:
case 0xbe:
case 0xbf:
1607 if ((bytes = (this->buffer_memory[this->buffer_offset + offset] & 0x1f)) < length) {
1608 ::memcpy(buffer, &(this->buffer_memory[this->buffer_offset + offset + 1]), bytes);
1616 if ((bytes = this->buffer_memory[this->buffer_offset + offset + 1]) < length) {
1617 ::memcpy(buffer, &(this->buffer_memory[this->buffer_offset + offset + 2]), bytes);
1625 if ((bytes = __builtin_bswap16(*(reinterpret_cast<const uint16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))))) < length) {
1626 ::memcpy(buffer, &(this->buffer_memory[this->buffer_offset + offset + 3]), bytes);
1634 if ((bytes = __builtin_bswap32(*(reinterpret_cast<const uint32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))))) < length) {
1635 ::memcpy(buffer, &(this->buffer_memory[this->buffer_offset + offset + 5]), bytes);
1645 bool MessagePack::decode(std::string & buffer, uint32_t offset) NO_EXCEPTIONS {
1646 if (UNLIKELY(offset == UINT32_MAX)) {
1651 switch (this->buffer_memory[this->buffer_offset + offset]) {
1652 case 0xa0:
case 0xa1:
case 0xa2:
case 0xa3:
case 0xa4:
case 0xa5:
case 0xa6:
case 0xa7:
1653 case 0xa8:
case 0xa9:
case 0xaa:
case 0xab:
case 0xac:
case 0xad:
case 0xae:
case 0xaf:
1654 case 0xb0:
case 0xb1:
case 0xb2:
case 0xb3:
case 0xb4:
case 0xb5:
case 0xb6:
case 0xb7:
1655 case 0xb8:
case 0xb9:
case 0xba:
case 0xbb:
case 0xbc:
case 0xbd:
case 0xbe:
case 0xbf:
1656 bytes = (this->buffer_memory[this->buffer_offset + offset] & 0x1f);
1657 buffer.assign(reinterpret_cast<const char *>(&(this->buffer_memory[this->buffer_offset + offset + 1])), bytes);
1662 bytes = this->buffer_memory[this->buffer_offset + offset + 1];
1663 buffer.assign(reinterpret_cast<const char *>(&(this->buffer_memory[this->buffer_offset + offset + 2])), bytes);
1668 bytes = __builtin_bswap16(*(reinterpret_cast<const uint16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))));
1669 buffer.assign(reinterpret_cast<const char *>(&(this->buffer_memory[this->buffer_offset + offset + 3])), bytes);
1674 bytes = __builtin_bswap32(*(reinterpret_cast<const uint32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))));
1675 buffer.assign(reinterpret_cast<const char *>(&(this->buffer_memory[this->buffer_offset + offset + 5])), bytes);
1682 bool MessagePack::decode(
bool & buffer, uint32_t offset) NO_EXCEPTIONS {
1683 if (UNLIKELY(offset == UINT32_MAX)) {
1687 switch (this->buffer_memory[this->buffer_offset + offset]) {
1701 bool MessagePack::decode(int64_t & buffer, uint32_t offset) NO_EXCEPTIONS {
1702 if (UNLIKELY(offset == UINT32_MAX)) {
1708 switch (this->buffer_memory[this->buffer_offset + offset]) {
1710 if (this->buffer_memory[this->buffer_offset + offset + 1] < 128) {
1711 buffer =
static_cast<int8_t
>(this->buffer_memory[this->buffer_offset + offset + 1]);
1718 if (__builtin_bswap16(static_cast<uint16_t>(*(reinterpret_cast<uint16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))))) <= INT16_MAX) {
1719 buffer =
static_cast<int16_t
>(__builtin_bswap16(static_cast<uint16_t>(*(reinterpret_cast<uint16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))))));
1726 if (__builtin_bswap32(static_cast<uint32_t>(*(reinterpret_cast<uint32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))))) <= INT32_MAX) {
1727 buffer =
static_cast<int32_t
>(__builtin_bswap32(static_cast<uint32_t>(*(reinterpret_cast<uint32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))))));
1734 if (__builtin_bswap64(static_cast<uint64_t>(*(reinterpret_cast<uint64_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))))) <= INT64_MAX) {
1735 buffer =
static_cast<int64_t
>(__builtin_bswap64(static_cast<uint64_t>(*(reinterpret_cast<uint64_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))))));
1742 buffer =
static_cast<int8_t
>(this->buffer_memory[this->buffer_offset + offset + 1]);
1747 read16 = __builtin_bswap16(*(reinterpret_cast<int16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))));
1753 read32 = __builtin_bswap32(*(reinterpret_cast<int32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))));
1759 buffer = __builtin_bswap64(static_cast<int64_t>(*(reinterpret_cast<int64_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))));
1763 case 0xe0:
case 0xe1:
case 0xe2:
case 0xe3:
case 0xe4:
case 0xe5:
case 0xe6:
case 0xe7:
1764 case 0xe8:
case 0xe9:
case 0xea:
case 0xeb:
case 0xec:
case 0xed:
case 0xee:
case 0xef:
1765 case 0xf0:
case 0xf1:
case 0xf2:
case 0xf3:
case 0xf4:
case 0xf5:
case 0xf6:
case 0xf7:
1766 case 0xf8:
case 0xf9:
case 0xfa:
case 0xfb:
case 0xfc:
case 0xfd:
case 0xfe:
case 0xff:
1767 buffer =
static_cast<int8_t
>(this->buffer_memory[this->buffer_offset + offset]);
1772 if ((this->buffer_memory[this->buffer_offset + offset] & 0x7f) == this->buffer_memory[this->buffer_offset + offset]) {
1773 buffer = this->buffer_memory[this->buffer_offset + offset] & 0x7f;
1781 bool MessagePack::decode(uint64_t & buffer, uint32_t offset) NO_EXCEPTIONS {
1782 if (UNLIKELY(offset == UINT32_MAX)) {
1786 switch (this->buffer_memory[this->buffer_offset + offset]) {
1788 buffer = this->buffer_memory[this->buffer_offset + offset + 1];
1793 buffer = __builtin_bswap16(static_cast<uint16_t>(*(reinterpret_cast<uint16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))));
1798 buffer = __builtin_bswap32(static_cast<uint32_t>(*(reinterpret_cast<uint32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))));
1803 buffer = __builtin_bswap64(static_cast<uint64_t>(*(reinterpret_cast<uint64_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))));
1808 if (static_cast<int8_t>(this->buffer_memory[this->buffer_offset + offset + 1]) >= 0) {
1809 buffer = this->buffer_memory[this->buffer_offset + offset + 1];
1816 if (__builtin_bswap16(*(reinterpret_cast<int16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))) >= 0) {
1817 buffer =
static_cast<uint16_t
>(__builtin_bswap16(*(reinterpret_cast<int16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))));
1824 if (__builtin_bswap32(*(reinterpret_cast<int32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))) >= 0) {
1825 buffer =
static_cast<uint32_t
>(__builtin_bswap32(*(reinterpret_cast<int32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))));
1832 if (__builtin_bswap64(*(reinterpret_cast<int64_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))) >= 0) {
1833 buffer =
static_cast<uint64_t
>(__builtin_bswap64(*(reinterpret_cast<int64_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1])))));
1840 if ((this->buffer_memory[this->buffer_offset + offset] & 0x7f) == this->buffer_memory[this->buffer_offset + offset]) {
1841 buffer = this->buffer_memory[this->buffer_offset + offset] & 0x7f;
1849 bool MessagePack::decode(
double & buffer, uint32_t offset) NO_EXCEPTIONS {
1850 if (UNLIKELY(offset == UINT32_MAX)) {
1854 switch (this->buffer_memory[this->buffer_offset + offset]) {
1856 buffer = __builtin_bswap32(*(reinterpret_cast<const float *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))));
1861 buffer = this->swap64(*(reinterpret_cast<const double *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))));
1869 void MessagePack::scan(uint32_t offset, mp_scan_callback callback,
void * parameters) {
1870 if (UNLIKELY(offset == UINT32_MAX)) {
1873 uint64_t count = this->count(offset);
1875 switch (this->buffer_memory[this->buffer_offset + offset]) {
1876 case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
1877 case 0x88:
case 0x89:
case 0x8a:
case 0x8b:
case 0x8c:
case 0x8d:
case 0x8e:
case 0x8f:
1878 this->scan_object(count, offset + 1, callback, parameters);
1881 case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
1882 case 0x98:
case 0x99:
case 0x9a:
case 0x9b:
case 0x9c:
case 0x9d:
case 0x9e:
case 0x9f:
1883 this->scan_vector(count, offset + 1, callback, parameters);
1887 this->scan_vector(count, offset + 3, callback, parameters);
1891 this->scan_vector(count, offset + 5, callback, parameters);
1895 this->scan_object(count, offset + 3, callback, parameters);
1899 this->scan_object(count, offset + 5, callback, parameters);
1905 void MessagePack::scan(uint32_t offset, std::function<
bool (uint32_t i, uint32_t v)> callback) {
1906 if (UNLIKELY(offset == UINT32_MAX)) {
1909 uint64_t count = this->count(offset);
1911 switch (this->buffer_memory[this->buffer_offset + offset]) {
1912 case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
1913 case 0x88:
case 0x89:
case 0x8a:
case 0x8b:
case 0x8c:
case 0x8d:
case 0x8e:
case 0x8f:
1914 this->scan_object(count, offset + 1, callback);
1917 case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
1918 case 0x98:
case 0x99:
case 0x9a:
case 0x9b:
case 0x9c:
case 0x9d:
case 0x9e:
case 0x9f:
1919 this->scan_vector(count, offset + 1, callback);
1923 this->scan_vector(count, offset + 3, callback);
1927 this->scan_vector(count, offset + 5, callback);
1931 this->scan_object(count, offset + 3, callback);
1935 this->scan_object(count, offset + 5, callback);
1941 void MessagePack::scan_vector(uint32_t length, uint32_t offset, std::function<
bool (uint32_t i, uint32_t v)> callback) {
1944 if (UNLIKELY(offset == UINT32_MAX)) {
1948 for (uint32_t i = 0; i < length; i++) {
1949 if (i < (length - 1)) {
1950 bytes = this->bytes(offset);
1953 if (callback(i, offset) ==
false) {
1957 if (i < (length - 1)) {
1964 void MessagePack::scan_vector(uint32_t length, uint32_t offset, mp_scan_callback callback,
void * parameters) {
1967 if (UNLIKELY(offset == UINT32_MAX)) {
1971 for (uint32_t i = 0; i < length; i++) {
1972 if (i < (length - 1)) {
1973 bytes = this->bytes(offset);
1976 if (callback(i, offset, parameters) ==
false) {
1980 if (i < (length - 1)) {
1987 void MessagePack::scan_object(uint32_t length, uint32_t offset, std::function<
bool (uint32_t i, uint32_t v)> callback) {
1988 if (UNLIKELY(offset == UINT32_MAX)) {
1992 for (uint32_t i = 0; i < length; i++) {
1993 uint32_t bytes = this->bytes(offset);
1995 if (callback(offset, offset + bytes) ==
false) {
1999 if (i < (length - 1)) {
2001 offset += this->bytes(offset);
2007 void MessagePack::scan_object(uint32_t length, uint32_t offset, mp_scan_callback callback,
void * parameters) {
2008 if (UNLIKELY(offset == UINT32_MAX)) {
2012 for (uint32_t i = 0; i < length; i++) {
2013 uint32_t bytes = this->bytes(offset);
2015 if (callback(offset, offset + bytes, parameters) ==
false) {
2019 if (i < (length - 1)) {
2021 offset += this->bytes(offset);
2026 bool MessagePack::resize(uint32_t offset, uint32_t size) NO_EXCEPTIONS {
2027 if (UNLIKELY(offset == UINT32_MAX)) {
2031 switch (this->buffer_memory[this->buffer_offset + offset]) {
2032 case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
2033 case 0x88:
case 0x89:
case 0x8a:
case 0x8b:
case 0x8c:
case 0x8d:
case 0x8e:
case 0x8f:
2035 this->buffer_memory[this->buffer_offset + offset] = 0x80 | size;
2041 case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
2042 case 0x98:
case 0x99:
case 0x9a:
case 0x9b:
case 0x9c:
case 0x9d:
case 0x9e:
case 0x9f:
2044 this->buffer_memory[this->buffer_offset + offset] = 0x90 | size;
2052 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<uint16_t>(size));
2059 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<uint32_t>(size));
2065 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<uint16_t>(size));
2072 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<uint32_t>(size));
2079 bool MessagePack::recast(uint32_t offset, uint32_t type) NO_EXCEPTIONS {
2080 if (UNLIKELY(offset == UINT32_MAX)) {
2085 switch (this->buffer_memory[this->buffer_offset + offset]) {
2086 case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
2087 case 0x88:
case 0x89:
case 0x8a:
case 0x8b:
case 0x8c:
case 0x8d:
case 0x8e:
case 0x8f:
2088 count = this->buffer_memory[this->buffer_offset + offset] & 0x0f;
2091 case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
2092 case 0x88:
case 0x89:
case 0x8a:
case 0x8b:
case 0x8c:
case 0x8d:
case 0x8e:
case 0x8f:
2096 if (UNLIKELY(this->expand(offset + 1, 2) ==
false)) {
2099 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<uint16_t>(count));
2101 this->buffer_memory[this->buffer_offset + offset] = 0xde;
2106 if (UNLIKELY(this->expand(offset + 1, 4) ==
false)) {
2109 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<uint32_t>(count));
2111 this->buffer_memory[this->buffer_offset + offset] = 0xdf;
2117 case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
2118 case 0x98:
case 0x99:
case 0x9a:
case 0x9b:
case 0x9c:
case 0x9d:
case 0x9e:
case 0x9f:
2119 count = this->buffer_memory[this->buffer_offset + offset] & 0x0f;
2122 case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
2123 case 0x98:
case 0x99:
case 0x9a:
case 0x9b:
case 0x9c:
case 0x9d:
case 0x9e:
case 0x9f:
2127 if (UNLIKELY(this->expand(offset + 1, 2) ==
false)) {
2130 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<uint16_t>(count));
2132 this->buffer_memory[this->buffer_offset + offset] = 0xdc;
2137 if (UNLIKELY(this->expand(offset + 1, 4) ==
false)) {
2140 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<uint32_t>(count));
2142 this->buffer_memory[this->buffer_offset + offset] = 0xdd;
2152 case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
2153 case 0x88:
case 0x89:
case 0x8a:
case 0x8b:
case 0x8c:
case 0x8d:
case 0x8e:
case 0x8f:
2154 this->buffer_memory[this->buffer_offset + offset] = type;
2158 case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
2159 case 0x98:
case 0x99:
case 0x9a:
case 0x9b:
case 0x9c:
case 0x9d:
case 0x9e:
case 0x9f:
2160 this->buffer_memory[this->buffer_offset + offset] = type;
2165 if (UNLIKELY(this->expand(offset + 1, 2) ==
false)) {
2168 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = 0;
2169 this->buffer_memory[this->buffer_offset + offset] = type;
2174 if (UNLIKELY(this->expand(offset + 1, 4) ==
false)) {
2177 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = 0;
2178 this->buffer_memory[this->buffer_offset + offset] = type;
2183 if (UNLIKELY(this->expand(offset + 1, 2) ==
false)) {
2186 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = 0;
2187 this->buffer_memory[this->buffer_offset + offset] = type;
2192 if (UNLIKELY(this->expand(offset + 1, 4) ==
false)) {
2195 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = 0;
2196 this->buffer_memory[this->buffer_offset + offset] = type;
2203 count = __builtin_bswap16(*(reinterpret_cast<uint16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))));
2206 case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
2207 case 0x98:
case 0x99:
case 0x9a:
case 0x9b:
case 0x9c:
case 0x9d:
case 0x9e:
case 0x9f:
2209 if (UNLIKELY(this->reduce(offset + 1, 2) ==
false)) {
2212 this->buffer_memory[this->buffer_offset + offset] = 0x90 | count;
2222 if (UNLIKELY(this->expand(offset + 1, 2) ==
false)) {
2225 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<uint32_t>(count));
2227 this->buffer_memory[this->buffer_offset + offset] = 0xdd;
2234 count = __builtin_bswap32(*(reinterpret_cast<uint32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))));
2237 case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
2238 case 0x98:
case 0x99:
case 0x9a:
case 0x9b:
case 0x9c:
case 0x9d:
case 0x9e:
case 0x9f:
2240 if (UNLIKELY(this->reduce(offset + 1, 4) ==
false)) {
2243 this->buffer_memory[this->buffer_offset + offset] = 0x90 | count;
2250 if (count < 65536) {
2251 if (UNLIKELY(this->reduce(offset + 1, 2) ==
false)) {
2254 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<uint16_t>(count));
2256 this->buffer_memory[this->buffer_offset + offset] = 0xdc;
2268 count = __builtin_bswap16(*(reinterpret_cast<uint16_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))));
2271 case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
2272 case 0x88:
case 0x89:
case 0x8a:
case 0x8b:
case 0x8c:
case 0x8d:
case 0x8e:
case 0x8f:
2274 if (UNLIKELY(this->reduce(offset + 1, 2) ==
false)) {
2277 this->buffer_memory[this->buffer_offset + offset] = 0x80 | count;
2287 if (UNLIKELY(this->expand(offset + 1, 2) ==
false)) {
2290 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<uint32_t>(count));
2292 this->buffer_memory[this->buffer_offset + offset] = 0xdf;
2299 count = __builtin_bswap32(*(reinterpret_cast<uint32_t *>(&(this->buffer_memory[this->buffer_offset + offset + 1]))));
2302 case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
2303 case 0x88:
case 0x89:
case 0x8a:
case 0x8b:
case 0x8c:
case 0x8d:
case 0x8e:
case 0x8f:
2305 if (UNLIKELY(this->reduce(offset + 1, 4) ==
false)) {
2308 this->buffer_memory[this->buffer_offset + offset] = 0x80 | count;
2315 if (count < 65536) {
2316 if (UNLIKELY(this->reduce(offset + 1, 2) ==
false)) {
2319 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<uint16_t>(count));
2321 this->buffer_memory[this->buffer_offset + offset] = 0xde;
2335 bool MessagePack::expand(uint32_t offset, uint32_t length) NO_EXCEPTIONS {
2336 if (UNLIKELY(offset == UINT32_MAX)) {
2339 uint32_t resize = CEIL_256(this->buffer_length - this->buffer_unused + length);
2341 if (this->buffer_unused < length) {
2342 if (resizable ==
false) {
2345 uint8_t * buffer =
reinterpret_cast<uint8_t *
>(::aligned_alloc(256, resize));
2347 if (UNLIKELY(buffer == NULL)) {
2350 ::memcpy(buffer, this->buffer_memory, this->buffer_length);
2351 SAFE_FREE(this->buffer_memory);
2353 this->buffer_unused = (resize - this->buffer_length) + this->buffer_unused;
2355 this->buffer_length = resize;
2356 this->buffer_memory = buffer;
2358 ::memmove(&(this->buffer_memory[this->buffer_offset + offset + length]), &(this->buffer_memory[this->buffer_offset + offset]), this->buffer_length - this->buffer_offset - offset - length);
2360 this->buffer_unused -= length;
2365 bool MessagePack::reduce(uint32_t offset, uint32_t length) NO_EXCEPTIONS {
2366 if (UNLIKELY(offset == UINT32_MAX)) {
2369 uint32_t resize = CEIL_256(this->buffer_length - this->buffer_unused - length);
2371 if (((this->buffer_length - this->buffer_offset - resize) + this->buffer_unused) > 0) {
2372 ::memmove(&(this->buffer_memory[this->buffer_offset + offset]), &(this->buffer_memory[this->buffer_offset + offset + length]), this->buffer_length - (this->buffer_offset + offset + length));
2375 if ((resize < this->buffer_length) && (resize > 0)) {
2376 if (resizable ==
false) {
2379 uint8_t * buffer =
reinterpret_cast<uint8_t *
>(::aligned_alloc(256, resize));
2381 if (UNLIKELY(buffer == NULL)) {
2384 ::memcpy(buffer, this->buffer_memory, resize);
2385 SAFE_FREE(this->buffer_memory);
2387 this->buffer_unused = (this->buffer_length - resize) + this->buffer_unused;
2389 this->buffer_length = resize;
2390 this->buffer_memory = buffer;
2392 this->buffer_unused += length;
2397 void MessagePack::print(
bool debug) NO_EXCEPTIONS {
2399 printf(
"Message Pack\n");
2400 printf(
" Buffer: %p\n", this->buffer_memory);
2401 printf(
" Length: %u\n", this->buffer_length);
2402 printf(
" Offset: %u\n", this->buffer_offset);
2403 printf(
" Unused: %u\n", this->buffer_unused);
2405 printf(
" Header\n");
2408 for (uint32_t i = 0; i < this->buffer_offset; i++) {
2409 printf(
"%02x ", this->buffer_memory[i]);
2411 if (((i + 1) % 8) == 0) {
2417 printf(
" Content\n");
2420 for (uint32_t i = this->buffer_offset; i < (this->buffer_length - this->buffer_unused); i++) {
2421 printf(
"%02x ", this->buffer_memory[i]);
2423 if (((i + 1) % 8) == 0) {
2429 printf(
" Unused\n");
2432 for (uint32_t i = (this->buffer_length - this->buffer_unused); i < this->buffer_length; i++) {
2433 printf(
"%02x ", this->buffer_memory[i]);
2435 if (((i + 1) % 8) == 0) {
2441 printf(
"JSON Format\n ");
2443 printf(
"%s", json(0).c_str());
2447 std::string MessagePack::json(uint32_t offset) NO_EXCEPTIONS {
2448 std::string buffer, tmp;
2456 switch (this->typeof(offset)) {
2457 case MessagePack::TYPE_NULL:
2458 buffer.append(
"null");
2461 case MessagePack::TYPE_VECTOR:
2462 buffer.append(
"[ ");
2464 this->scan(offset, [
this, & n, & buffer](uint32_t i, uint32_t v) {
2466 buffer.append(
", ");
2470 buffer.append(json(v));
2474 buffer.append(
" ]");
2478 case MessagePack::TYPE_OBJECT:
2479 buffer.append(
"{ ");
2481 this->scan(offset, [
this, & n, & buffer](uint32_t i, uint32_t v) {
2483 buffer.append(
", ");
2487 buffer.append(json(i));
2488 buffer.append(
": ");
2489 buffer.append(json(v));
2494 buffer.append(
" }");
2497 case MessagePack::TYPE_STRING:
2498 this->decode(tmp, offset);
2500 buffer.push_back(
'"');
2502 buffer.push_back(
'"');
2505 case MessagePack::TYPE_BOOLEAN:
2506 this->decode(b, offset);
2508 buffer.append((b) ?
"true" :
"false");
2511 case MessagePack::TYPE_SIGNED:
2512 this->decode(s, offset);
2514 buffer.append(std::to_string(s));
2517 case MessagePack::TYPE_UNSIGNED:
2518 this->decode(u, offset);
2520 buffer.append(std::to_string(u));
2523 case MessagePack::TYPE_FLOAT:
2524 this->decode(d, offset);
2526 buffer.append(std::to_string(d));
2529 case MessagePack::TYPE_BINARY:
2530 buffer.append(
"\"(binary)\"");
2533 case MessagePack::TYPE_EXTENSION:
2534 buffer.append(
"\"(extension)\"");
2537 case MessagePack::TYPE_UNKNOWN:
2538 buffer.append(
"\"(unknown)\"");
2545 uint32_t MessagePack::append(uint32_t offset,
const char * value) NO_EXCEPTIONS {
2546 if (UNLIKELY(offset == UINT32_MAX)) {
2549 uint32_t bytes = ::strlen(value);
2553 switch (CLZ32(bytes)) {
2554 case 32:
case 31:
case 30:
case 29:
case 28:
2558 case 27:
case 26:
case 25:
case 24:
2562 case 23:
case 22:
case 21:
case 20:
2563 case 19:
case 18:
case 17:
case 16:
2567 case 15:
case 14:
case 13:
case 12:
2568 case 11:
case 10:
case 9:
case 8:
2569 case 7:
case 6:
case 5:
case 4:
2570 case 3:
case 2:
case 1:
case 0:
2579 if (UNLIKELY((this->buffer_offset + offset + zeros + 1 + bytes) > this->buffer_length)) {
2585 this->buffer_memory[this->buffer_offset + offset] = 0xa0 + bytes;
2589 this->buffer_memory[this->buffer_offset + offset] = 0xd9;
2590 this->buffer_memory[this->buffer_offset + offset + 1] = bytes;
2594 this->buffer_memory[this->buffer_offset + offset] = 0xda;
2595 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<uint16_t>(bytes));
2599 this->buffer_memory[this->buffer_offset + offset] = 0xdb;
2600 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<uint32_t>(bytes));
2603 ::memcpy(&(this->buffer_memory[this->buffer_offset + offset + zeros + 1]), value, bytes);
2605 return zeros + 1 + bytes;
2608 uint32_t MessagePack::append(uint32_t offset,
const std::string & value) NO_EXCEPTIONS {
2609 if (UNLIKELY(offset == UINT32_MAX)) {
2612 uint32_t bytes = value.size();
2616 switch (CLZ32(bytes)) {
2617 case 32:
case 31:
case 30:
case 29:
case 28:
2621 case 27:
case 26:
case 25:
case 24:
2625 case 23:
case 22:
case 21:
case 20:
2626 case 19:
case 18:
case 17:
case 16:
2630 case 15:
case 14:
case 13:
case 12:
2631 case 11:
case 10:
case 9:
case 8:
2632 case 7:
case 6:
case 5:
case 4:
2633 case 3:
case 2:
case 1:
case 0:
2642 if (UNLIKELY((this->buffer_offset + offset + zeros + 1 + bytes) > this->buffer_length)) {
2648 this->buffer_memory[this->buffer_offset + offset] = 0xa0 + bytes;
2652 this->buffer_memory[this->buffer_offset + offset] = 0xd9;
2653 this->buffer_memory[this->buffer_offset + offset + 1] = bytes;
2657 this->buffer_memory[this->buffer_offset + offset] = 0xda;
2658 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<uint16_t>(bytes));
2662 this->buffer_memory[this->buffer_offset + offset] = 0xdb;
2663 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<uint32_t>(bytes));
2666 ::memcpy(&(this->buffer_memory[this->buffer_offset + offset + zeros + 1]), value.data(), bytes);
2668 return zeros + 1 + bytes;
2671 uint32_t MessagePack::append(uint32_t offset,
bool value) NO_EXCEPTIONS {
2672 if (UNLIKELY(offset == UINT32_MAX)) {
2677 if (UNLIKELY((this->buffer_offset + offset + 1) > this->buffer_length)) {
2682 this->buffer_memory[this->buffer_offset + offset] = 0xc3;
2684 this->buffer_memory[this->buffer_offset + offset] = 0xc2;
2689 uint32_t MessagePack::append(uint32_t offset, int64_t value) NO_EXCEPTIONS {
2691 if (UNLIKELY(offset == UINT32_MAX)) {
2698 switch (CLZ64(value)) {
2699 case 64:
case 63:
case 62:
case 61:
case 60:
case 59:
case 58:
case 57:
2703 case 56:
case 55:
case 54:
case 53:
case 52:
case 51:
case 50:
case 49:
2708 case 47:
case 46:
case 45:
case 44:
2709 case 43:
case 42:
case 41:
case 40:
2710 case 39:
case 38:
case 37:
case 36:
2711 case 35:
case 34:
case 33:
2720 if (value < INT8_MIN) {
2721 if (value < INT16_MIN) {
2722 if (value < INT32_MIN) {
2737 if ((this->buffer_offset + offset + 1 + zeros) > this->buffer_length) {
2744 this->buffer_memory[this->buffer_offset + offset] =
static_cast<int8_t
>(value) | 0xe0;
2746 this->buffer_memory[this->buffer_offset + offset] =
static_cast<int8_t
>(value);
2751 this->buffer_memory[this->buffer_offset + offset + 1] =
static_cast<int8_t
>(value);
2752 this->buffer_memory[this->buffer_offset + offset] = 0xd0;
2757 *(
reinterpret_cast<int16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<int16_t>(value));
2758 this->buffer_memory[this->buffer_offset + offset] = 0xd1;
2763 *(
reinterpret_cast<int32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<int32_t>(value));
2764 this->buffer_memory[this->buffer_offset + offset] = 0xd2;
2769 *(
reinterpret_cast<int64_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap64(static_cast<int64_t>(value));
2770 this->buffer_memory[this->buffer_offset + offset] = 0xd3;
2776 int64_t * encoded =
reinterpret_cast<int64_t *
>(&(
reinterpret_cast<char *
>(this->buffer_memory)[this->buffer_offset + offset + 1]));
2778 reinterpret_cast<char *
>(this->buffer_memory)[this->buffer_offset + offset] = 0xd3;
2779 *(encoded) = BSWAP64(value);
2785 uint32_t MessagePack::append(uint32_t offset, uint64_t value) NO_EXCEPTIONS {
2786 if (UNLIKELY(offset == UINT32_MAX)) {
2792 switch (CLZ64(value)) {
2793 case 64:
case 63:
case 62:
case 61:
case 60:
case 59:
case 58:
case 57:
2801 case 55:
case 54:
case 53:
case 52:
2802 case 51:
case 50:
case 49:
case 48:
2806 case 47:
case 46:
case 45:
case 44:
2807 case 43:
case 42:
case 41:
case 40:
2808 case 39:
case 38:
case 37:
case 36:
2809 case 35:
case 34:
case 33:
case 32:
2818 if ((this->buffer_offset + offset + 1 + zeros) > this->buffer_length) {
2824 this->buffer_memory[this->buffer_offset + offset] =
static_cast<uint8_t
>(value);
2829 this->buffer_memory[this->buffer_offset + offset + 1] =
static_cast<uint8_t
>(value);
2830 this->buffer_memory[this->buffer_offset + offset] = 0xcc;
2835 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<uint16_t>(value));
2836 this->buffer_memory[this->buffer_offset + offset] = 0xcd;
2841 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<uint32_t>(value));
2842 this->buffer_memory[this->buffer_offset + offset] = 0xce;
2847 *(
reinterpret_cast<uint64_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap64(static_cast<uint64_t>(value));
2848 this->buffer_memory[this->buffer_offset + offset] = 0xcf;
2855 uint32_t MessagePack::append(uint32_t offset,
double value) NO_EXCEPTIONS {
2856 if ((this->buffer_offset + offset + 1 +
sizeof(
double)) > this->buffer_length) {
2859 value = this->swap64(value);
2861 ::memcpy(&(this->buffer_memory[this->buffer_offset + offset + 1]), &(value),
sizeof(
double));
2862 this->buffer_memory[this->buffer_offset + offset] = 0xcb;
2864 return 1 +
sizeof(double);
2867 uint32_t MessagePack::append(uint32_t offset) NO_EXCEPTIONS {
2868 if (UNLIKELY(offset == UINT32_MAX)) {
2873 if (UNLIKELY((this->buffer_offset + offset + 1) > this->buffer_length)) {
2876 this->buffer_memory[this->buffer_offset + offset] = 0xc0;
2881 uint32_t MessagePack::append_object(uint32_t offset, uint32_t count) NO_EXCEPTIONS {
2885 switch (CLZ32(count)) {
2886 case 32:
case 31:
case 30:
case 29:
case 28:
2890 case 27:
case 26:
case 25:
case 24:
2891 case 23:
case 22:
case 21:
case 20:
2892 case 19:
case 18:
case 17:
case 16:
2896 case 15:
case 14:
case 13:
case 12:
2897 case 11:
case 10:
case 9:
case 8:
2898 case 7:
case 6:
case 5:
case 4:
2899 case 3:
case 2:
case 1:
case 0:
2907 if ((this->buffer_offset + offset + 1 + zeros) > this->buffer_length) {
2913 this->buffer_memory[this->buffer_offset + offset] = 0x80 | count;
2917 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<uint16_t>(count));
2918 this->buffer_memory[this->buffer_offset + offset] = 0xde;
2922 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<uint32_t>(count));
2923 this->buffer_memory[this->buffer_offset + offset] = 0xdf;
2929 uint32_t MessagePack::append_vector(uint32_t offset, uint32_t count) NO_EXCEPTIONS {
2933 switch (CLZ32(count)) {
2934 case 32:
case 31:
case 30:
case 29:
case 28:
2937 case 27:
case 26:
case 25:
case 24:
2938 case 23:
case 22:
case 21:
case 20:
2939 case 19:
case 18:
case 17:
case 16:
2943 case 15:
case 14:
case 13:
case 12:
2944 case 11:
case 10:
case 9:
case 8:
2945 case 7:
case 6:
case 5:
case 4:
2946 case 3:
case 2:
case 1:
case 0:
2954 if ((this->buffer_offset + offset + 1 + zeros) > this->buffer_length) {
2960 this->buffer_memory[this->buffer_offset + offset] = 0x90 | count;
2964 *(
reinterpret_cast<uint16_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap16(static_cast<uint16_t>(count));
2965 this->buffer_memory[this->buffer_offset + offset] = 0xdc;
2969 *(
reinterpret_cast<uint32_t *
>(&(this->buffer_memory[this->buffer_offset + offset + 1]))) = __builtin_bswap32(static_cast<uint32_t>(count));
2970 this->buffer_memory[this->buffer_offset + offset] = 0xdd;
2976 uint32_t MessagePack::size(
void) NO_EXCEPTIONS {
2977 return this->buffer_length - this->buffer_offset - this->buffer_unused;
2980 uint32_t MessagePack::length(
void) NO_EXCEPTIONS {
2981 return this->buffer_length;
2984 uint32_t MessagePack::next(uint32_t offset) NO_EXCEPTIONS {
2985 return offset + bytes(offset);
2988 uint32_t MessagePack::down(uint32_t offset) NO_EXCEPTIONS {
2989 switch (this->buffer_memory[this->buffer_offset + offset]) {
2990 case 0x80:
case 0x81:
case 0x82:
case 0x83:
case 0x84:
case 0x85:
case 0x86:
case 0x87:
2991 case 0x88:
case 0x89:
case 0x8a:
case 0x8b:
case 0x8c:
case 0x8d:
case 0x8e:
case 0x8f:
2992 case 0x90:
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
2993 case 0x98:
case 0x99:
case 0x9a:
case 0x9b:
case 0x9c:
case 0x9d:
case 0x9e:
case 0x9f:
3012 uint32_t MessagePack::append_kv(uint32_t offset,
const char * key,
const char * value) NO_EXCEPTIONS {
3015 if (UNLIKELY((c1 = append(offset, key)) == 0)) {
3019 if (UNLIKELY((c2 = append(c1 + offset, value)) == 0)) {
3026 uint32_t MessagePack::append_kv(uint32_t offset,
const char * key,
const std::string & value) NO_EXCEPTIONS {
3029 if (UNLIKELY((c1 = append(offset, key)) == 0)) {
3033 if (UNLIKELY((c2 = append(c1 + offset, value)) == 0)) {
3040 uint32_t MessagePack::append_kv(uint32_t offset,
const char * key,
bool value) NO_EXCEPTIONS {
3043 if (UNLIKELY((c1 = append(offset, key)) == 0)) {
3047 if (UNLIKELY((c2 = append(c1 + offset, value)) == 0)) {
3054 uint32_t MessagePack::append_kv(uint32_t offset,
const char * key, int64_t value) NO_EXCEPTIONS {
3057 if (UNLIKELY((c1 = append(offset, key)) == 0)) {
3061 if (UNLIKELY((c2 = append(c1 + offset, value)) == 0)) {
3068 uint32_t MessagePack::append_kv(uint32_t offset,
const char * key, uint64_t value) NO_EXCEPTIONS {
3071 if (UNLIKELY((c1 = append(offset, key)) == 0)) {
3075 if (UNLIKELY((c2 = append(c1 + offset, value)) == 0)) {
3082 uint32_t MessagePack::append_kv(uint32_t offset,
const char * key,
double value) NO_EXCEPTIONS {
3085 if (UNLIKELY((c1 = append(offset, key)) == 0)) {
3089 if (UNLIKELY((c2 = append(c1 + offset, value)) == 0)) {
3096 uint32_t MessagePack::append_kv(uint32_t offset,
const char * key) NO_EXCEPTIONS {
3099 if (UNLIKELY((c1 = append(offset, key)) == 0)) {
3103 if (UNLIKELY((c2 = append(c1 + offset)) == 0)) {
3110 uint32_t MessagePack::append_kv(uint32_t offset,
const std::string & key,
const char * value) NO_EXCEPTIONS {
3113 if (UNLIKELY((c1 = append(offset, key)) == 0)) {
3117 if (UNLIKELY((c2 = append(c1 + offset, value)) == 0)) {
3124 uint32_t MessagePack::append_kv(uint32_t offset,
const std::string & key,
const std::string & value) NO_EXCEPTIONS {
3127 if (UNLIKELY((c1 = append(offset, key)) == 0)) {
3131 if (UNLIKELY((c2 = append(c1 + offset, value)) == 0)) {
3138 uint32_t MessagePack::append_kv(uint32_t offset,
const std::string & key,
bool value) NO_EXCEPTIONS {
3141 if (UNLIKELY((c1 = append(offset, key)) == 0)) {
3145 if (UNLIKELY((c2 = append(c1 + offset, value)) == 0)) {
3152 uint32_t MessagePack::append_kv(uint32_t offset,
const std::string & key, int64_t value) NO_EXCEPTIONS {
3155 if (UNLIKELY((c1 = append(offset, key)) == 0)) {
3159 if (UNLIKELY((c2 = append(c1 + offset, value)) == 0)) {
3166 uint32_t MessagePack::append_kv(uint32_t offset,
const std::string & key, uint64_t value) NO_EXCEPTIONS {
3169 if (UNLIKELY((c1 = append(offset, key)) == 0)) {
3173 if (UNLIKELY((c2 = append(c1 + offset, value)) == 0)) {
3180 uint32_t MessagePack::append_kv(uint32_t offset,
const std::string & key,
double value) NO_EXCEPTIONS {
3183 if (UNLIKELY((c1 = append(offset, key)) == 0)) {
3187 if (UNLIKELY((c2 = append(c1 + offset, value)) == 0)) {
3194 uint32_t MessagePack::append_kv(uint32_t offset,
const std::string & key) NO_EXCEPTIONS {
3197 if (UNLIKELY((c1 = append(offset, key)) == 0)) {
3201 if (UNLIKELY((c2 = append(c1 + offset)) == 0)) {
3208 const mpack_table_t MessagePack::mpack_table[256] = {
3210 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3211 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3212 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3213 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3214 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3215 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3216 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3217 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3218 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3219 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3220 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3221 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3222 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3223 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3224 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3225 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3227 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3228 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3229 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3230 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3231 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3232 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3233 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3234 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3235 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3236 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3237 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3238 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3239 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3240 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3241 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3242 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3244 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3245 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3246 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3247 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3248 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3249 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3250 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3251 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3252 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3253 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3254 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3255 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3256 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3257 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3258 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3259 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3261 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3262 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3263 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3264 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3265 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3266 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3267 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3268 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3269 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3270 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3271 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3272 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3273 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3274 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3275 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3276 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3278 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3279 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3280 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3281 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3282 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3283 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3284 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3285 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3286 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3287 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3288 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3289 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3290 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3291 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3292 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3293 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3295 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3296 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3297 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3298 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3299 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3300 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3301 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3302 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3303 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3304 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3305 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3306 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3307 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3308 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3309 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3310 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3312 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3313 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3314 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3315 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3316 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3317 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3318 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3319 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3320 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3321 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3322 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3323 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3324 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3325 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3326 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3327 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3329 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3330 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3331 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3332 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3333 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3334 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3335 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3336 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3337 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3338 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3339 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3340 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3341 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3342 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3343 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3344 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3347 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3348 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3349 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3350 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3351 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3352 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3353 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3354 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3355 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3356 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3357 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3358 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3359 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3360 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3361 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3362 { 1, 0x00, 0x01, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3365 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3366 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3367 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3368 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3369 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3370 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3371 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3372 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3373 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3374 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3375 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3376 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3377 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3378 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3379 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3380 { 1, 0x00, 0x00, 0x0f, 0x00000000, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3383 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3384 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3385 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3386 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3387 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3388 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3389 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3390 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3391 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3392 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3393 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3394 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3395 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3396 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3397 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3398 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3399 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3400 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3401 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3402 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3403 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3404 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3405 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3406 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3407 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3408 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3409 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3410 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3411 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3412 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3413 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3414 { 1, 0x1f, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3417 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_NULL, 0x00, 0x0000 },
3420 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_UNKNOWN, 0x00, 0x0000 },
3423 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_BOOLEAN, 0x00, 0x0000 },
3424 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_BOOLEAN, 0x00, 0x0000 },
3427 { 2, 0x00, 0x00, 0x00, 0x00000000, 0xff000000, MessagePack::TYPE_BINARY, 0x18, 0x0000 },
3428 { 3, 0x00, 0x00, 0x00, 0x00000000, 0xffff0000, MessagePack::TYPE_BINARY, 0x10, 0x0000 },
3429 { 5, 0x00, 0x00, 0x00, 0x00000000, 0xffffffff, MessagePack::TYPE_BINARY, 0x00, 0x0000 },
3432 { 3, 0x00, 0x00, 0x00, 0x00000000, 0xff000000, MessagePack::TYPE_EXTENSION, 0x18, 0x0000 },
3433 { 4, 0x00, 0x00, 0x00, 0x00000000, 0xffff0000, MessagePack::TYPE_EXTENSION, 0x10, 0x0000 },
3434 { 6, 0x00, 0x00, 0x00, 0x00000000, 0xffffffff, MessagePack::TYPE_EXTENSION, 0x00, 0x0000 },
3437 { 5, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_FLOAT, 0x00, 0x0000 },
3438 { 9, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_FLOAT, 0x00, 0x0000 },
3441 { 2, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_UNSIGNED, 0x00, 0x0000 },
3442 { 3, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_UNSIGNED, 0x00, 0x0000 },
3443 { 5, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_UNSIGNED, 0x00, 0x0000 },
3444 { 9, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_UNSIGNED, 0x00, 0x0000 },
3447 { 2, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3448 { 3, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3449 { 5, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3450 { 9, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3453 { 3, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_EXTENSION, 0x00, 0x0000 },
3454 { 4, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_EXTENSION, 0x00, 0x0000 },
3455 { 6, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_EXTENSION, 0x00, 0x0000 },
3456 { 10, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_EXTENSION, 0x00, 0x0000 },
3457 { 18, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_EXTENSION, 0x00, 0x0000 },
3460 { 2, 0x00, 0x00, 0x00, 0x00000000, 0xff000000, MessagePack::TYPE_STRING, 0x18, 0x0000 },
3461 { 3, 0x00, 0x00, 0x00, 0x00000000, 0xffff0000, MessagePack::TYPE_STRING, 0x10, 0x0000 },
3462 { 5, 0x00, 0x00, 0x00, 0x00000000, 0xffffffff, MessagePack::TYPE_STRING, 0x00, 0x0000 },
3465 { 3, 0x00, 0x00, 0x00, 0xffff0000, 0x00000000, MessagePack::TYPE_VECTOR, 0x10, 0x0000 },
3466 { 5, 0x00, 0x00, 0x00, 0xffffffff, 0x00000000, MessagePack::TYPE_VECTOR, 0x00, 0x0000 },
3469 { 3, 0x00, 0x01, 0x00, 0xffff0000, 0x00000000, MessagePack::TYPE_OBJECT, 0x10, 0x0000 },
3470 { 5, 0x00, 0x01, 0x00, 0xffffffff, 0x00000000, MessagePack::TYPE_OBJECT, 0x00, 0x0000 },
3473 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3474 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3475 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3476 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3477 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3478 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3479 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3480 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3481 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3482 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3483 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3484 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3485 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3486 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3487 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3488 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3490 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3491 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3492 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3493 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3494 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3495 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3496 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3497 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3498 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3499 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3500 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3501 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3502 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3503 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3504 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 },
3505 { 1, 0x00, 0x00, 0x00, 0x00000000, 0x00000000, MessagePack::TYPE_SIGNED, 0x00, 0x0000 }