Searched refs:addlInfo (Results 1 – 2 of 2) sorted by relevance
/external/libcppbor/src/ |
D | cppbor.cpp | 260 size_t headerSize(uint64_t addlInfo) { in headerSize() argument 261 if (addlInfo < ONE_BYTE_LENGTH) return 1; in headerSize() 262 if (addlInfo <= std::numeric_limits<uint8_t>::max()) return 2; in headerSize() 263 if (addlInfo <= std::numeric_limits<uint16_t>::max()) return 3; in headerSize() 264 if (addlInfo <= std::numeric_limits<uint32_t>::max()) return 5; in headerSize() 268 uint8_t* encodeHeader(MajorType type, uint64_t addlInfo, uint8_t* pos, const uint8_t* end) { in encodeHeader() argument 269 size_t sz = headerSize(addlInfo); in encodeHeader() 273 *pos++ = type | static_cast<uint8_t>(addlInfo); in encodeHeader() 277 *pos++ = static_cast<uint8_t>(addlInfo); in encodeHeader() 281 return writeBigEndian(static_cast<uint16_t>(addlInfo), pos); in encodeHeader() [all …]
|
/external/libcppbor/include/cppbor/ |
D | cppbor.h | 76 size_t headerSize(uint64_t addlInfo); 83 uint8_t* encodeHeader(MajorType type, uint64_t addlInfo, uint8_t* pos, const uint8_t* end); 91 void encodeHeader(MajorType type, uint64_t addlInfo, EncodeCallback encodeCallback); 101 void encodeHeader(MajorType type, uint64_t addlInfo, OutputIterator iter) { in encodeHeader() argument 102 return encodeHeader(type, addlInfo, [&](uint8_t v) { *iter++ = v; }); in encodeHeader() 236 inline uint8_t* encodeHeader(uint64_t addlInfo, uint8_t* pos, const uint8_t* end) const { in encodeHeader() argument 237 return ::cppbor::encodeHeader(type(), addlInfo, pos, end); in encodeHeader() 243 inline void encodeHeader(uint64_t addlInfo, EncodeCallback encodeCallback) const { in encodeHeader() argument 244 ::cppbor::encodeHeader(type(), addlInfo, encodeCallback); in encodeHeader() 345 size_t encodedSize() const override { return headerSize(addlInfo()); } in encodedSize() [all …]
|