consolidate all repos to one for archive

This commit is contained in:
2025-01-28 13:46:42 +01:00
commit a6610fbc7a
5350 changed files with 2705721 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
#pragma once
#include "Buffer.hpp"
class BitReader
{
public:
int k = 8;
Buffer buffer;
char x = 0;
size_t pos = 0;
int readInt()
{
int ret = buffer.buffer[pos];
pos += 4;
return ret;
}
char readByte()
{
x = buffer.buffer[pos];
pos++;
return x;
}
bool readBit()
{
if (k == 8)
{
readByte();
k = 0;
}
bool b = (x >> k) & 1;
k++;
return b;
}
};