21 extern const unsigned char BIT_MASK[];
27 Index numBytesWritten = 0;
31 if(numBytesWritten < strm->buffer.bufLen)
49 unsigned int numBitsWrite = 0;
50 unsigned char tmp = 0;
52 unsigned int numBytesToBeWritten = ((
unsigned int) nbits) / 8 + (8 - strm->
context.
bitPointer < nbits % 8 );
63 while(numBitsWrite < nbits)
65 if((
unsigned int)(nbits - numBitsWrite) <= (
unsigned int)(8 - strm->
context.
bitPointer))
66 bits_in_byte = nbits - numBitsWrite;
70 tmp = (bits_val >> (nbits - numBitsWrite - bits_in_byte)) &
BIT_MASK[bits_in_byte];
75 numBitsWrite += bits_in_byte;