5#ifndef BITCOIN_SERIALIZE_INTCODE_H
6#define BITCOIN_SERIALIZE_INTCODE_H
24 0x0100'0000'0000'0000,
73 for (
size_t i = 0; i <
numBytes; ++i) {
108 "non-canonical ReadMitraInt(): 0x%016x out of range for %d "
static uint64_t CountBits(uint64_t x)
Return the smallest number n such that (x >> n) == 0 (or 64 if the highest bit in x is set.
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
uint8_t ser_readdata8(Stream &s)
void ser_writedata8(Stream &s, uint8_t obj)
Lowest-level serialization and conversion.
const uint64_t VALID_RANGE[]
uint64_t ReadIntcode(Stream &is)
Read a 64-bit integer as intcode, see WriteIntcode.
void WriteIntcode(Stream &os, uint64_t value)
Write a 64-bit integer in intcode encoding: