/
bitstream.h
48 lines (40 loc) · 1.04 KB
/
bitstream.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/////////////////////////////////////////////////////////////////////////
//
// bitstream.h --a part of libdecodeqr
//
// Copyright(C) 2007 NISHI Takao <zophos@koka-in.org>
// JMA (Japan Medical Association)
// NaCl (Network Applied Communication Laboratory Ltd.)
//
// This is free software with ABSOLUTELY NO WARRANTY.
// You can redistribute and/or modify it under the terms of LGPL.
//
// $Id: bitstream.h 36 2007-02-21 23:22:03Z zophos $
//
#ifndef __QR_BITSTREAM__
#define __QR_BITSTREAM__
#include <memory.h>
#ifndef NULL
#define NULL 0
#endif
namespace Qr{
class BitStream{
public:
unsigned char *data;
int byte_size;
int bit_size;
private:
int _pos;
public:
BitStream();
BitStream(void *src,int size);
~BitStream();
bool is_eod();
int position();
int seek(int pos);
void rewind();
unsigned char *read(int read_bits);
int read(void *dst,int buf_size,int bitsize);
};
};
#endif