printf ("%d %d %d %d\n", bits->bitPtr, bits->charPtr, bits->nbBits, max_nchars);
int speex_bits_write(SpeexBits *bits, char *chars, int max_nbytes){   int i;   int max_nchars = max_nbytes/BYTES_PER_CHAR;   int charPtr, bitPtr, nbBits;      /* Insert terminator, but save the data so we can put it back after */   bitPtr=bits->bitPtr;   charPtr=bits->charPtr;   nbBits=bits->nbBits;   speex_bits_insert_terminator(bits);   bits->bitPtr=bitPtr;   bits->charPtr=charPtr;   bits->nbBits=nbBits;   if (max_nchars > ((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR))      max_nchars = ((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR);#if BYTES_PER_CHAR==1#define HTOLS(A) (A)#else#define HTOLS(A) ((((A) >> 8)&0xff)|(((A) & 0xff)<<8))#endif   for (i=0;i<max_nchars;i++)      chars[i]=HTOLS(bits->chars[i]);   return max_nchars*BYTES_PER_CHAR;}