#ifndef __BITSTREAM_H__
#define __BITSTREAM_H__
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>


typedef struct bitstream
{
    int pos;   // stream pointer in index
    int size;  // stream memsize in bytes
    uint8_t* data;
    
    int xbits; // tmp remain bits
    uint8_t  tmp;
    uint8_t  resv0;
    uint16_t resv1;
}bitstream_t;

#endif//__BITSTREAM_H__