344 memcpy(&count, bufin + pindex,
sizeof(count));
345 pindex +=
sizeof(
count);
351 memcpy(&sym, bufin + pindex,
sizeof(uint16_t));
352 pindex +=
sizeof(uint16_t);
361 memcpy(&numbits, bufin + pindex,
sizeof(uint8_t));
362 pindex +=
sizeof(uint8_t);
367 if (numbytes>
sizeof(
size_t))
368 throw std::runtime_error(
"Number of bytes for a single symbol exceeds maximum.");
370 if (numbytes>
sizeof(
size_t))
377 memcpy(&bits, bufin+pindex, numbytes);
380 Set(sym, numbits, bits);
static unsigned long numbytes_from_numbits(unsigned long numbits)
void Set(uint16_t sym, uint8_t n=0, size_t bits=0)