Missed 4 bits

--HG--
branch : cdb-packed
hg/feature/cdb-packed
kaetemi 10 years ago
parent 06e9d20850
commit 9fec239dfb

@ -134,8 +134,9 @@ inline uint readPackedBitCount(CBitMemStream & f)
{ {
uint64 bitCount; uint64 bitCount;
f.serial(bitCount, 4); f.serial(bitCount, 4);
nlinfo("PACKED: %u bits", (uint32)(bitCount << 2)); uint bits = (bitCount << 2) + 4;
return bitCount << 2; nlinfo("PACKED: %u bits", (uint32)(bits));
return bits;
} }
else else
{ {

@ -556,11 +556,11 @@ inline void pushPackedValue( CBitMemStream& s, uint64 value, uint32& bitsize, ui
if (next) if (next)
{ {
bits += 4; bits += 4;
test = next; // test = next;
} }
else else
{ {
test = next & 0xF; // test = next & 0xF;
} }
if (bits + 5 > 64) // 1 bit isPacked, 4 bits bitCount if (bits + 5 > 64) // 1 bit isPacked, 4 bits bitCount
{ {
@ -573,6 +573,7 @@ inline void pushPackedValue( CBitMemStream& s, uint64 value, uint32& bitsize, ui
{ {
uint64 isPacked = 1; uint64 isPacked = 1;
uint64 bitCount = bits >> 2; uint64 bitCount = bits >> 2;
bits += 4;
s.serialAndLog2( isPacked, 1 ); s.serialAndLog2( isPacked, 1 );
s.serialAndLog2( bitCount, 4 ); s.serialAndLog2( bitCount, 4 );
s.serialAndLog2( value, bits ); s.serialAndLog2( value, bits );

Loading…
Cancel
Save