diff options
author | Javier <dev.git@javispedro.com> | 2015-06-07 21:22:45 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-06-07 21:22:45 +0200 |
commit | a69e97943539a8abc4d2762638c169dc19c88516 (patch) | |
tree | f3516ea29745db65971247cee4c260b49f1067b2 /bitreader.h | |
download | scribiu-a69e97943539a8abc4d2762638c169dc19c88516.tar.gz scribiu-a69e97943539a8abc4d2762638c169dc19c88516.zip |
initial import
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 |