95 curr &= (~(0xF<<(4*(offset%2))));
96 curr |= (value<<(4*(offset%2)));
105 curr &= (~(0x3<<(2*(offset%4))));
106 curr |= (value<<(2*(offset%4)));
250 int alignedSize = (numEntries*
BITS+7)/8;
252 assert(0 == offset%2);
253 fread(data,
sizeof(uint8_t), alignedSize,
chunkFile);
278 for (
unsigned int x = 0; x < buckets.size(); x++)
280 printf(
"Bucket %d has %" PRId64
" entries\n", x, buckets[x].theSize);
284 { printf(
"Error opening file '%s'\n",
getBucketFileName(x, subBucket)); exit(0); }
287 int64_t totalBytes = (buckets[x].theSize*
BITS+7)/8;
289 for (
int y = 0; y < 2048; y++)
291 for (int64_t y = 0; y < totalBytes; y+=2048)
300 { printf(
"Error opening file '%s'\n",
getBucketFileName(x, subBucket)); exit(0); }
302 int64_t amnt =
std::min(totalBytes-y, (int64_t)2048ll);
303 fwrite(data,
sizeof(uint8_t), amnt, f);