19 #include <type_traits> 30 namespace compression {
42 DCHECK_LE(n,
sizeof(
T));
45 if (!cursor.tryReadLE(value)) {
48 const T mask = n ==
sizeof(
T) ?
T(-1) : (
T(1) << (8 * n)) - 1;
49 return prefix == (value & mask);
56 DCHECK_LE(n,
sizeof(
T));
60 memcpy(&result[0], &prefix, n);
—— Concurrent Priority Queue Implementation ——
bool prefix(Cursor &c, uint32_t expected)
std::enable_if< std::is_arithmetic< T >::value, std::string >::type prefixToStringLE(T prefix, uint64_t n=sizeof(T))
constexpr auto data(C &c) -> decltype(c.data())
static const char *const value
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
std::enable_if< std::is_unsigned< T >::value, bool >::type dataStartsWithLE(const IOBuf *data, T prefix, uint64_t n=sizeof(T))