10 #ifndef MSGPACK_V1_PACK_HPP 11 #define MSGPACK_V1_PACK_HPP 31 template <
typename Stream>
58 packer<Stream>&
pack(
const T& v);
482 packer<Stream>&
pack_map(uint32_t n);
496 packer<Stream>&
pack_str(uint32_t l);
548 packer<Stream>&
pack_bin(uint32_t l);
574 packer<Stream>&
pack_ext(
size_t l, int8_t type);
589 template <
typename T>
590 void pack_imp_uint8(T d);
591 template <
typename T>
592 void pack_imp_uint16(T d);
593 template <
typename T>
594 void pack_imp_uint32(T d);
595 template <
typename T>
596 void pack_imp_uint64(T d);
597 template <
typename T>
598 void pack_imp_int8(T d);
599 template <
typename T>
600 void pack_imp_int16(T d);
601 template <
typename T>
602 void pack_imp_int32(T d);
603 template <
typename T>
604 void pack_imp_int64(T d);
606 void append_buffer(
const char* buf,
size_t len)
607 { m_stream.write(buf, len); }
612 #if defined(MSGPACK_USE_CPP03) 617 #else // defined(MSGPACK_USE_CPP03) 622 #endif // defined(MSGPACK_USE_CPP03) 636 template <
typename Stream,
typename T>
637 inline void pack(Stream* s,
const T& v)
649 template <
typename Stream,
typename T>
650 inline void pack(Stream& s,
const T& v)
656 #if MSGPACK_ENDIAN_LITTLE_BYTE 657 template <
typename T>
658 inline char take8_8(T d) {
659 return static_cast<char>(
reinterpret_cast<uint8_t*
>(&d)[0]);
661 template <
typename T>
662 inline char take8_16(T d) {
663 return static_cast<char>(
reinterpret_cast<uint8_t*
>(&d)[0]);
665 template <
typename T>
666 inline char take8_32(T d) {
667 return static_cast<char>(
reinterpret_cast<uint8_t*
>(&d)[0]);
669 template <
typename T>
670 inline char take8_64(T d) {
671 return static_cast<char>(
reinterpret_cast<uint8_t*
>(&d)[0]);
674 #elif MSGPACK_ENDIAN_BIG_BYTE 676 template <
typename T>
677 inline char take8_8(T d) {
678 return static_cast<char>(
reinterpret_cast<uint8_t*
>(&d)[0]);
680 template <
typename T>
681 inline char take8_16(T d) {
682 return static_cast<char>(
reinterpret_cast<uint8_t*
>(&d)[1]);
684 template <
typename T>
685 inline char take8_32(T d) {
686 return static_cast<char>(
reinterpret_cast<uint8_t*
>(&d)[3]);
688 template <
typename T>
689 inline char take8_64(T d) {
690 return static_cast<char>(
reinterpret_cast<uint8_t*
>(&d)[7]);
694 #error msgpack-c supports only big endian and little endian 697 template <
typename Stream>
700 template <
typename Stream>
704 template <
typename Stream>
706 { pack_imp_uint8(d);
return *
this; }
708 template <
typename Stream>
710 { pack_imp_uint16(d);
return *
this; }
712 template <
typename Stream>
714 { pack_imp_uint32(d);
return *
this; }
716 template <
typename Stream>
718 { pack_imp_uint64(d);
return *
this; }
720 template <
typename Stream>
722 { pack_imp_int8(d);
return *
this; }
724 template <
typename Stream>
726 { pack_imp_int16(d);
return *
this; }
728 template <
typename Stream>
730 { pack_imp_int32(d);
return *
this; }
732 template <
typename Stream>
734 { pack_imp_int64(d);
return *
this;}
737 template <
typename Stream>
740 char buf[2] = {
static_cast<char>(0xccu), take8_8(d)};
741 append_buffer(buf, 2);
745 template <
typename Stream>
749 buf[0] =
static_cast<char>(0xcdu); _msgpack_store16(&buf[1], d);
750 append_buffer(buf, 3);
754 template <
typename Stream>
758 buf[0] =
static_cast<char>(0xceu); _msgpack_store32(&buf[1], d);
759 append_buffer(buf, 5);
763 template <
typename Stream>
767 buf[0] =
static_cast<char>(0xcfu); _msgpack_store64(&buf[1], d);
768 append_buffer(buf, 9);
772 template <
typename Stream>
775 char buf[2] = {
static_cast<char>(0xd0u), take8_8(d)};
776 append_buffer(buf, 2);
780 template <
typename Stream>
784 buf[0] =
static_cast<char>(0xd1u); _msgpack_store16(&buf[1], d);
785 append_buffer(buf, 3);
789 template <
typename Stream>
793 buf[0] =
static_cast<char>(0xd2u); _msgpack_store32(&buf[1], d);
794 append_buffer(buf, 5);
798 template <
typename Stream>
802 buf[0] =
static_cast<char>(0xd3u); _msgpack_store64(&buf[1], d);
803 append_buffer(buf, 9);
808 template <
typename Stream>
811 #if defined(CHAR_MIN) 818 #error CHAR_MIN is not defined 823 template <
typename Stream>
830 template <
typename Stream>
833 #if defined(SIZEOF_SHORT) 834 #if SIZEOF_SHORT == 2 836 #elif SIZEOF_SHORT == 4 842 #elif defined(SHRT_MAX) 843 #if SHRT_MAX == 0x7fff 845 #elif SHRT_MAX == 0x7fffffff 852 if(
sizeof(
short) == 2) {
854 }
else if(
sizeof(
short) == 4) {
863 template <
typename Stream>
866 #if defined(SIZEOF_INT) 869 #elif SIZEOF_INT == 4 875 #elif defined(INT_MAX) 876 #if INT_MAX == 0x7fff 878 #elif INT_MAX == 0x7fffffff 885 if(
sizeof(
int) == 2) {
887 }
else if(
sizeof(
int) == 4) {
896 template <
typename Stream>
899 #if defined(SIZEOF_LONG) 902 #elif SIZEOF_LONG == 4 908 #elif defined(LONG_MAX) 909 #if LONG_MAX == 0x7fffL 911 #elif LONG_MAX == 0x7fffffffL 918 if(
sizeof(
long) == 2) {
920 }
else if(
sizeof(
long) == 4) {
929 template <
typename Stream>
932 #if defined(SIZEOF_LONG_LONG) 933 #if SIZEOF_LONG_LONG == 2 935 #elif SIZEOF_LONG_LONG == 4 941 #elif defined(LLONG_MAX) 942 #if LLONG_MAX == 0x7fffL 944 #elif LLONG_MAX == 0x7fffffffL 951 if(
sizeof(
long long) == 2) {
953 }
else if(
sizeof(
long long) == 4) {
963 template <
typename Stream>
970 template <
typename Stream>
973 #if defined(SIZEOF_SHORT) 974 #if SIZEOF_SHORT == 2 976 #elif SIZEOF_SHORT == 4 982 #elif defined(USHRT_MAX) 983 #if USHRT_MAX == 0xffffU 985 #elif USHRT_MAX == 0xffffffffU 992 if(
sizeof(
unsigned short) == 2) {
994 }
else if(
sizeof(
unsigned short) == 4) {
1003 template <
typename Stream>
1006 #if defined(SIZEOF_INT) 1009 #elif SIZEOF_INT == 4 1015 #elif defined(UINT_MAX) 1016 #if UINT_MAX == 0xffffU 1018 #elif UINT_MAX == 0xffffffffU 1025 if(
sizeof(
unsigned int) == 2) {
1027 }
else if(
sizeof(
unsigned int) == 4) {
1036 template <
typename Stream>
1039 #if defined(SIZEOF_LONG) 1040 #if SIZEOF_LONG == 2 1042 #elif SIZEOF_LONG == 4 1048 #elif defined(ULONG_MAX) 1049 #if ULONG_MAX == 0xffffUL 1051 #elif ULONG_MAX == 0xffffffffUL 1058 if(
sizeof(
unsigned long) == 2) {
1060 }
else if(
sizeof(
unsigned long) == 4) {
1069 template <
typename Stream>
1072 #if defined(SIZEOF_LONG_LONG) 1073 #if SIZEOF_LONG_LONG == 2 1075 #elif SIZEOF_LONG_LONG == 4 1081 #elif defined(ULLONG_MAX) 1082 #if ULLONG_MAX == 0xffffUL 1084 #elif ULLONG_MAX == 0xffffffffUL 1091 if(
sizeof(
unsigned long long) == 2) {
1093 }
else if(
sizeof(
unsigned long long) == 4) {
1103 template <
typename Stream>
1106 union {
float f; uint32_t i; } mem;
1109 buf[0] =
static_cast<char>(0xcau); _msgpack_store32(&buf[1], mem.i);
1110 append_buffer(buf, 5);
1114 template <
typename Stream>
1117 union {
double f; uint64_t i; } mem;
1120 buf[0] =
static_cast<char>(0xcbu);
1122 #if defined(TARGET_OS_IPHONE) 1124 #elif defined(__arm__) && !(__ARM_EABI__) // arm-oabi 1126 mem.i = (mem.i & 0xFFFFFFFFUL) << 32UL | (mem.i >> 32UL);
1128 _msgpack_store64(&buf[1], mem.i);
1129 append_buffer(buf, 9);
1134 template <
typename Stream>
1137 const char d =
static_cast<char>(0xc0u);
1138 append_buffer(&d, 1);
1142 template <
typename Stream>
1145 const char d =
static_cast<char>(0xc3u);
1146 append_buffer(&d, 1);
1150 template <
typename Stream>
1153 const char d =
static_cast<char>(0xc2u);
1154 append_buffer(&d, 1);
1159 template <
typename Stream>
1163 char d =
static_cast<char>(0x90u | n);
1164 append_buffer(&d, 1);
1165 }
else if(n < 65536) {
1167 buf[0] =
static_cast<char>(0xdcu); _msgpack_store16(&buf[1], static_cast<uint16_t>(n));
1168 append_buffer(buf, 3);
1171 buf[0] =
static_cast<char>(0xddu); _msgpack_store32(&buf[1], static_cast<uint32_t>(n));
1172 append_buffer(buf, 5);
1177 template <
typename Stream>
1181 unsigned char d =
static_cast<unsigned char>(0x80u | n);
1182 char buf = take8_8(d);
1183 append_buffer(&buf, 1);
1184 }
else if(n < 65536) {
1186 buf[0] =
static_cast<char>(0xdeu); _msgpack_store16(&buf[1], static_cast<uint16_t>(n));
1187 append_buffer(buf, 3);
1190 buf[0] =
static_cast<char>(0xdfu); _msgpack_store32(&buf[1], static_cast<uint32_t>(n));
1191 append_buffer(buf, 5);
1196 template <
typename Stream>
1200 unsigned char d =
static_cast<uint8_t
>(0xa0u | l);
1201 char buf = take8_8(d);
1202 append_buffer(&buf, 1);
1203 }
else if(l < 256) {
1205 buf[0] =
static_cast<char>(0xd9u); buf[1] =
static_cast<uint8_t
>(l);
1206 append_buffer(buf, 2);
1207 }
else if(l < 65536) {
1209 buf[0] =
static_cast<char>(0xdau); _msgpack_store16(&buf[1], static_cast<uint16_t>(l));
1210 append_buffer(buf, 3);
1213 buf[0] =
static_cast<char>(0xdbu); _msgpack_store32(&buf[1], static_cast<uint32_t>(l));
1214 append_buffer(buf, 5);
1219 template <
typename Stream>
1222 append_buffer(b, l);
1228 template <
typename Stream>
1232 unsigned char d =
static_cast<uint8_t
>(0xa0u | l);
1233 char buf = take8_8(d);
1234 append_buffer(&buf, 1);
1235 }
else if(l < 65536) {
1237 buf[0] =
static_cast<char>(0xdau); _msgpack_store16(&buf[1], static_cast<uint16_t>(l));
1238 append_buffer(buf, 3);
1241 buf[0] =
static_cast<char>(0xdbu); _msgpack_store32(&buf[1], static_cast<uint32_t>(l));
1242 append_buffer(buf, 5);
1247 template <
typename Stream>
1250 append_buffer(b, l);
1254 template <
typename Stream>
1259 buf[0] =
static_cast<char>(0xc4u); buf[1] =
static_cast<uint8_t
>(l);
1260 append_buffer(buf, 2);
1261 }
else if(l < 65536) {
1263 buf[0] =
static_cast<char>(0xc5u); _msgpack_store16(&buf[1], static_cast<uint16_t>(l));
1264 append_buffer(buf, 3);
1267 buf[0] =
static_cast<char>(0xc6u); _msgpack_store32(&buf[1], static_cast<uint32_t>(l));
1268 append_buffer(buf, 5);
1273 template <
typename Stream>
1276 append_buffer(b, l);
1280 template <
typename Stream>
1286 buf[0] =
static_cast<char>(0xd4u);
1287 buf[1] =
static_cast<char>(type);
1288 append_buffer(buf, 2);
1292 buf[0] =
static_cast<char>(0xd5u);
1293 buf[1] =
static_cast<char>(type);
1294 append_buffer(buf, 2);
1298 buf[0] =
static_cast<char>(0xd6u);
1299 buf[1] =
static_cast<char>(type);
1300 append_buffer(buf, 2);
1304 buf[0] =
static_cast<char>(0xd7u);
1305 buf[1] =
static_cast<char>(type);
1306 append_buffer(buf, 2);
1310 buf[0] =
static_cast<char>(0xd8u);
1311 buf[1] =
static_cast<char>(type);
1312 append_buffer(buf, 2);
1317 buf[0] =
static_cast<char>(0xc7u);
1318 buf[1] =
static_cast<char>(l);
1319 buf[2] =
static_cast<char>(type);
1320 append_buffer(buf, 3);
1321 }
else if(l < 65536) {
1323 buf[0] =
static_cast<char>(0xc8u);
1324 _msgpack_store16(&buf[1], static_cast<uint16_t>(l));
1325 buf[3] =
static_cast<char>(type);
1326 append_buffer(buf, 4);
1329 buf[0] =
static_cast<char>(0xc9u);
1330 _msgpack_store32(&buf[1], static_cast<uint32_t>(l));
1331 buf[5] =
static_cast<char>(type);
1332 append_buffer(buf, 6);
1339 template <
typename Stream>
1342 append_buffer(b, l);
1346 template <
typename Stream>
1347 template <
typename T>
1352 char buf = take8_8(d);
1353 append_buffer(&buf, 1);
1356 char buf[2] = {
static_cast<char>(0xccu), take8_8(d)};
1357 append_buffer(buf, 2);
1361 template <
typename Stream>
1362 template <
typename T>
1367 char buf = take8_16(d);
1368 append_buffer(&buf, 1);
1369 }
else if(d < (1<<8)) {
1371 char buf[2] = {
static_cast<char>(0xccu), take8_16(d)};
1372 append_buffer(buf, 2);
1376 buf[0] =
static_cast<char>(0xcdu); _msgpack_store16(&buf[1], static_cast<uint16_t>(d));
1377 append_buffer(buf, 3);
1381 template <
typename Stream>
1382 template <
typename T>
1388 char buf = take8_32(d);
1389 append_buffer(&buf, 1);
1392 char buf[2] = {
static_cast<char>(0xccu), take8_32(d)};
1393 append_buffer(buf, 2);
1399 buf[0] =
static_cast<char>(0xcdu); _msgpack_store16(&buf[1], static_cast<uint16_t>(d));
1400 append_buffer(buf, 3);
1404 buf[0] =
static_cast<char>(0xceu); _msgpack_store32(&buf[1], static_cast<uint32_t>(d));
1405 append_buffer(buf, 5);
1410 template <
typename Stream>
1411 template <
typename T>
1417 char buf = take8_64(d);
1418 append_buffer(&buf, 1);
1421 char buf[2] = {
static_cast<char>(0xccu), take8_64(d)};
1422 append_buffer(buf, 2);
1425 if(d < (1ULL<<16)) {
1428 buf[0] =
static_cast<char>(0xcdu); _msgpack_store16(&buf[1], static_cast<uint16_t>(d));
1429 append_buffer(buf, 3);
1430 }
else if(d < (1ULL<<32)) {
1433 buf[0] =
static_cast<char>(0xceu); _msgpack_store32(&buf[1], static_cast<uint32_t>(d));
1434 append_buffer(buf, 5);
1438 buf[0] =
static_cast<char>(0xcfu); _msgpack_store64(&buf[1], d);
1439 append_buffer(buf, 9);
1444 template <
typename Stream>
1445 template <
typename T>
1450 char buf[2] = {
static_cast<char>(0xd0u), take8_8(d)};
1451 append_buffer(buf, 2);
1454 char buf = take8_8(d);
1455 append_buffer(&buf, 1);
1459 template <
typename Stream>
1460 template <
typename T>
1467 buf[0] =
static_cast<char>(0xd1u); _msgpack_store16(&buf[1], static_cast<int16_t>(d));
1468 append_buffer(buf, 3);
1471 char buf[2] = {
static_cast<char>(0xd0u), take8_16(d)};
1472 append_buffer(buf, 2);
1474 }
else if(d < (1<<7)) {
1476 char buf = take8_16(d);
1477 append_buffer(&buf, 1);
1481 char buf[2] = {
static_cast<char>(0xccu), take8_16(d)};
1482 append_buffer(buf, 2);
1486 buf[0] =
static_cast<char>(0xcdu); _msgpack_store16(&buf[1], static_cast<uint16_t>(d));
1487 append_buffer(buf, 3);
1492 template <
typename Stream>
1493 template <
typename T>
1500 buf[0] =
static_cast<char>(0xd2u); _msgpack_store32(&buf[1], static_cast<int32_t>(d));
1501 append_buffer(buf, 5);
1502 }
else if(d < -(1<<7)) {
1505 buf[0] =
static_cast<char>(0xd1u); _msgpack_store16(&buf[1], static_cast<int16_t>(d));
1506 append_buffer(buf, 3);
1509 char buf[2] = {
static_cast<char>(0xd0u), take8_32(d)};
1510 append_buffer(buf, 2);
1512 }
else if(d < (1<<7)) {
1514 char buf = take8_32(d);
1515 append_buffer(&buf, 1);
1519 char buf[2] = {
static_cast<char>(0xccu), take8_32(d)};
1520 append_buffer(buf, 2);
1521 }
else if(d < (1<<16)) {
1524 buf[0] =
static_cast<char>(0xcdu); _msgpack_store16(&buf[1], static_cast<uint16_t>(d));
1525 append_buffer(buf, 3);
1529 buf[0] =
static_cast<char>(0xceu); _msgpack_store32(&buf[1], static_cast<uint32_t>(d));
1530 append_buffer(buf, 5);
1535 template <
typename Stream>
1536 template <
typename T>
1540 if(d < -(1LL<<15)) {
1541 if(d < -(1LL<<31)) {
1544 buf[0] =
static_cast<char>(0xd3u); _msgpack_store64(&buf[1], d);
1545 append_buffer(buf, 9);
1549 buf[0] =
static_cast<char>(0xd2u); _msgpack_store32(&buf[1], static_cast<int32_t>(d));
1550 append_buffer(buf, 5);
1556 buf[0] =
static_cast<char>(0xd1u); _msgpack_store16(&buf[1], static_cast<int16_t>(d));
1557 append_buffer(buf, 3);
1560 char buf[2] = {
static_cast<char>(0xd0u), take8_64(d)};
1561 append_buffer(buf, 2);
1564 }
else if(d < (1<<7)) {
1566 char buf = take8_64(d);
1567 append_buffer(&buf, 1);
1572 char buf[2] = {
static_cast<char>(0xccu), take8_64(d)};
1573 append_buffer(buf, 2);
1577 buf[0] =
static_cast<char>(0xcdu); _msgpack_store16(&buf[1], static_cast<uint16_t>(d));
1578 append_buffer(buf, 3);
1584 buf[0] =
static_cast<char>(0xceu); _msgpack_store32(&buf[1], static_cast<uint32_t>(d));
1585 append_buffer(buf, 5);
1589 buf[0] =
static_cast<char>(0xcfu); _msgpack_store64(&buf[1], d);
1590 append_buffer(buf, 9);
1602 #endif // MSGPACK_V1_PACK_HPP packer< Stream > & pack_bin(uint32_t l)
Packing bin header and length.
Definition: pack.hpp:1255
packer< Stream > & pack_fix_uint16(uint16_t d)
Packing uint8 (fixed packed type).
Definition: pack.hpp:746
packer< Stream > & pack_fix_uint32(uint32_t d)
Packing uint8 (fixed packed type).
Definition: pack.hpp:755
packer< Stream > & pack_char(char d)
Packing char.
Definition: pack.hpp:809
packer< Stream > & pack_v4raw(uint32_t l)
Packing raw (v4) header and length.
Definition: pack.hpp:1229
packer< Stream > & pack_long_long(long long d)
Packing long long.
Definition: pack.hpp:930
packer< Stream > & pack_ext(size_t l, int8_t type)
Packing ext header, type, and length.
Definition: pack.hpp:1281
packer< Stream > & pack_uint16(uint16_t d)
Packing uint16.
Definition: pack.hpp:709
packer & operator=(const packer &)=delete
packer< Stream > & pack_unsigned_int(unsigned int d)
Packing unsigned int.
Definition: pack.hpp:1004
packer< Stream > & pack_short(short d)
Packing short.
Definition: pack.hpp:831
packer< Stream > & pack_long(long d)
Packing long.
Definition: pack.hpp:897
packer< Stream > & pack_array(uint32_t n)
Packing array header and size.
Definition: pack.hpp:1160
packer< Stream > & pack_uint64(uint64_t d)
Packing uint16.
Definition: pack.hpp:717
Definition: adaptor_base.hpp:15
packer< Stream > & pack_int64(int64_t d)
Packing int32.
Definition: pack.hpp:733
packer< Stream > & pack_uint8(uint8_t d)
Packing uint8.
Definition: pack.hpp:705
packer< Stream > & pack_bin_body(const char *b, uint32_t l)
Packing bin body.
Definition: pack.hpp:1274
packer< Stream > & pack_false()
Packing false.
Definition: pack.hpp:1151
packer< Stream > & pack(const T &v)
Packing function template.
packer< Stream > & pack_str_body(const char *b, uint32_t l)
Packing str body.
Definition: pack.hpp:1220
packer< Stream > & pack_int16(int16_t d)
Packing int16.
Definition: pack.hpp:725
packer< Stream > & pack_true()
Packing true.
Definition: pack.hpp:1143
packer< Stream > & pack_uint32(uint32_t d)
Packing uint32.
Definition: pack.hpp:713
packer< Stream > & pack_fix_int32(int32_t d)
Packing uint8 (fixed packed type).
Definition: pack.hpp:790
packer< Stream > & pack_unsigned_short(unsigned short d)
Packing unsigned short.
Definition: pack.hpp:971
packer< Stream > & pack_map(uint32_t n)
Packing map header and size.
Definition: pack.hpp:1178
packer< Stream > & pack_int32(int32_t d)
Packing int32.
Definition: pack.hpp:729
packer< Stream > & pack_float(float d)
Packing float.
Definition: pack.hpp:1104
packer< Stream > & pack_v4raw_body(const char *b, uint32_t l)
Packing raw (v4) body.
Definition: pack.hpp:1248
packer< Stream > & pack_double(double d)
Packing double.
Definition: pack.hpp:1115
packer< Stream > & pack_ext_body(const char *b, uint32_t l)
Packing ext body.
Definition: pack.hpp:1340
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:58
packer< Stream > & pack_fix_int16(int16_t d)
Packing uint8 (fixed packed type).
Definition: pack.hpp:781
packer< Stream > & pack_int8(int8_t d)
Packing int8.
Definition: pack.hpp:721
packer< Stream > & pack_fix_int8(int8_t d)
Packing uint8 (fixed packed type).
Definition: pack.hpp:773
The class template that supports continuous packing.
Definition: adaptor_base_decl.hpp:24
packer< Stream > & pack_fix_uint8(uint8_t d)
Packing uint8 (fixed packed type).
Definition: pack.hpp:738
packer< Stream > & pack_signed_char(signed char d)
Packing signed char.
Definition: pack.hpp:824
packer< Stream > & pack_fix_uint64(uint64_t d)
Packing uint8 (fixed packed type).
Definition: pack.hpp:764
packer< Stream > & pack_nil()
Packing nil.
Definition: pack.hpp:1135
packer< Stream > & pack_str(uint32_t l)
Packing str header and length.
Definition: pack.hpp:1197
packer< Stream > & pack_unsigned_long(unsigned long d)
Packing unsigned long.
Definition: pack.hpp:1037
packer< Stream > & pack_unsigned_long_long(unsigned long long d)
Packing unsigned long long.
Definition: pack.hpp:1070
packer< Stream > & pack_int(int d)
Packing int.
Definition: pack.hpp:864
packer< Stream > & pack_fix_int64(int64_t d)
Packing uint8 (fixed packed type).
Definition: pack.hpp:799
packer< Stream > & pack_unsigned_char(unsigned char d)
Packing unsigned char.
Definition: pack.hpp:964