FLAC__ASSERT(bits <= 32);
FLAC__ASSERT((bb->capacity*8) * 2 >= bits);
+ if(bits == 0) {
+ *val = 0;
+ return true;
+ }
+
while(bb->total_consumed_bits + bits > bb->total_bits) {
if(!bitbuffer_read_from_client_(bb, read_callback, client_data))
return false;
FLAC__ASSERT(bits <= 32);
+ if(bits == 0) {
+ *val = 0;
+ return true;
+ }
+
v = 0;
for(i = 0; i < bits; i++) {
if(!FLAC__bitbuffer_read_bit_to_uint32(bb, &v, read_callback, client_data))
FLAC__ASSERT(bits <= 32);
FLAC__ASSERT((bb->capacity*8) * 2 >= bits);
+ if(bits == 0) {
+ *val = 0;
+ return true;
+ }
+
while(bb->total_consumed_bits + bits > bb->total_bits) {
if(!bitbuffer_read_from_client_(bb, read_callback, client_data))
return false;
FLAC__ASSERT(bits <= 64);
FLAC__ASSERT((bb->capacity*8) * 2 >= bits);
+ if(bits == 0) {
+ *val = 0;
+ return true;
+ }
+
while(bb->total_consumed_bits + bits > bb->total_bits) {
if(!bitbuffer_read_from_client_(bb, read_callback, client_data))
return false;
FLAC__ASSERT(bits <= 64);
+ if(bits == 0) {
+ *val = 0;
+ return true;
+ }
+
v = 0;
for(i = 0; i < bits; i++) {
if(!FLAC__bitbuffer_read_bit_to_uint64(bb, &v, read_callback, client_data))
FLAC__ASSERT(bits <= 64);
FLAC__ASSERT((bb->capacity*8) * 2 >= bits);
+ if(bits == 0) {
+ *val = 0;
+ return true;
+ }
+
while(bb->total_consumed_bits + bits > bb->total_bits) {
if(!bitbuffer_read_from_client_(bb, read_callback, client_data))
return false;