#include <stdio.h>

struct _bitstream;
typedef struct _bitstream BITSTREAM;

BITSTREAM *bitstream_wopen(FILE *fp);
int bitstream_wclose(BITSTREAM *bsp);
void bitstream_wbit(BITSTREAM *bsp, int bit);
BITSTREAM *bitstream_ropen(FILE *fp);
int bitstream_rbit(BITSTREAM *bsp);
int bitstream_rclose(BITSTREAM *bsp);
