Revert "[Base] Changed size of bitstream accessed data (Risky)"

This reverts commit 061000af01.
This commit is contained in:
Gliniak 2022-10-09 12:18:43 +02:00
parent 08d38bdff6
commit 17b3939bbf
1 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ uint64_t BitStream::Peek(size_t num_bits) {
// offset --> // offset -->
// ..[junk]..| target bits |....[junk]............. // ..[junk]..| target bits |....[junk].............
uint32_t bits = *(uint32_t*)(buffer_ + offset_bytes); uint64_t bits = *(uint64_t*)(buffer_ + offset_bytes);
// We need the data in little endian. // We need the data in little endian.
// TODO: Have a flag specifying endianness of data? // TODO: Have a flag specifying endianness of data?
@ -49,7 +49,7 @@ uint64_t BitStream::Peek(size_t num_bits) {
// Shift right // Shift right
// .....[junk]........| target bits | // .....[junk]........| target bits |
bits >>= 32 - (rel_offset_bits + num_bits); bits >>= 64 - (rel_offset_bits + num_bits);
// AND with mask // AND with mask
// ...................| target bits | // ...................| target bits |