22 #ifndef NDN_CXX_ENCODING_ESTIMATOR_HPP 23 #define NDN_CXX_ENCODING_ESTIMATOR_HPP 61 template<
class Iterator>
65 return static_cast<size_t>(std::distance(first, last));
71 template<
class Iterator>
75 return static_cast<size_t>(std::distance(first, last));
118 #endif // NDN_CXX_ENCODING_ESTIMATOR_HPP Copyright (c) 2011-2015 Regents of the University of California.
constexpr size_t appendVarNumber(uint64_t n) const noexcept
Append n in VarNumber encoding.
constexpr size_t sizeOfNonNegativeInteger(uint64_t integer) noexcept
Get the number of bytes necessary to hold the value of integer encoded as NonNegativeInteger.
constexpr size_t prependNonNegativeInteger(uint64_t n) const noexcept
Prepend n in NonNegativeInteger encoding.
constexpr size_t prependRange(Iterator first, Iterator last) const noexcept
Prepend bytes from the range [first, last)
constexpr size_t appendNonNegativeInteger(uint64_t n) const noexcept
Append n in NonNegativeInteger encoding.
constexpr size_t appendRange(Iterator first, Iterator last) const noexcept
Append bytes from the range [first, last)
constexpr size_t sizeOfVarNumber(uint64_t number) noexcept
Get the number of bytes necessary to hold the value of number encoded as VAR-NUMBER.
constexpr size_t prependVarNumber(uint64_t n) const noexcept
Prepend n in VarNumber encoding.
constexpr size_t prependBytes(span< const uint8_t > bytes) const noexcept
Prepend a sequence of bytes.
constexpr size_t appendBytes(span< const uint8_t > bytes) const noexcept
Append a sequence of bytes.
Helper class to estimate size of TLV encoding.