3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.tizenopensource.org/license
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 #ifndef _BIT_READER_H_
19 #define _BIT_READER_H_
24 : public Osp::Base::Object
30 result Construct(const byte* pBuf, int size);
31 unsigned long GetBits(unsigned long size);
32 void SkipBits(int size);
34 unsigned char SetByteAlign();
35 unsigned long GetProcessedBytes();
39 unsigned long long ReadNbyte(unsigned char* buf, int n);
40 void ClearBits(unsigned long bits);
41 void ClearBitsEx(unsigned long bits);
46 unsigned long __bitsLeft;
47 unsigned long __bufferSize; /* size of the buffer in bytes */
48 unsigned long __bytesUsed;
49 unsigned char __noMoreReading;
50 unsigned char __error;
51 unsigned char* __start;
52 unsigned char* __tail;
53 unsigned char* __buffer;
57 #endif // _BIT_READER_H_