diff options
Diffstat (limited to 'bitreader.h')
-rw-r--r-- | bitreader.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bitreader.h b/bitreader.h new file mode 100644 index 0000000..c4b9207 --- /dev/null +++ b/bitreader.h @@ -0,0 +1,25 @@ +#ifndef BITREADER_H +#define BITREADER_H + +#include <QtCore/QIODevice> + +class BitReader +{ +public: + BitReader(QIODevice * device); + ~BitReader(); + + quint64 readBits(int n); + quint64 peekBits(int n); + + void skipUntilNextByte(); + + bool atEnd(); + +private: + QIODevice *child; + quint64 buf; + int avail; +}; + +#endif // BITREADER_H |