00001 #ifndef __J2K__BitVector_HPP__
00002 #define __J2K__BitVector_HPP__
00003
00004 #include <j2k/Fred/Basic.hpp>
00005 #include <j2k/Fred/StdTypes.hpp>
00006
00007 #include <limits.h>
00008
00009 class BitVector {
00010 public:
00011 BitVector();
00012
00013
00014
00015
00016 BitVector(UCHAR* init, int size = 8);
00017
00018
00019 BitVector(char* binary);
00020 virtual ~BitVector();
00021
00022 void set( int bit );
00023 void clear( int bit );
00024 int read( int bit );
00025
00026 int bits();
00027 void bits(int sz);
00028
00029 void print(const char* msg = "");
00030
00031 private:
00032 UCHAR* bytes;
00033 int Bits;
00034 int numBytes;
00035 };
00036
00037 #endif