#ifndef SMK_BITSTREAM_H
#define SMK_BITSTREAM_H
struct smk_bit_t;
struct smk_bit_t* smk_bs_init(const unsigned char* b, unsigned long size);
#define smk_bs_read_1(t,uc) \
{ \
if ((char)(uc = _smk_bs_read_1(t)) < 0) \
{ \
fprintf(stderr, "libsmacker::smk_bs_read_1(" #t ", " #uc ") - ERROR (file: %s, line: %lu)\n", __FILE__, (unsigned long)__LINE__); \
goto error; \
} \
}
char _smk_bs_read_1(struct smk_bit_t* bs);
#define smk_bs_read_8(t,s) \
{ \
if ((short)(s = _smk_bs_read_8(t)) < 0) \
{ \
fprintf(stderr, "libsmacker::smk_bs_read_8(" #t ", " #s ") - ERROR (file: %s, line: %lu)\n", __FILE__, (unsigned long)__LINE__); \
goto error; \
} \
}
short _smk_bs_read_8(struct smk_bit_t* bs);
#endif