#ifndef UTIL_H_ #define UTIL_H_ #include #include #include #include #include using std::string; namespace utils { class Util { public: /* retorna os bits do buffer. */ static unsigned long long getBits(unsigned char* buf, int byte_offset, int startbit, int bitlen); static void stringUpper(string& string); static string int2str(int n); static int stringtoint(const char* string); static long long getBits48(unsigned char *buf, int byte_offset, int startbit, int bitlen); static unsigned long long getBits64(unsigned char *buf, int byte_offset, int startbit, int bitlen); }; } #endif /*UTIL_H_*/