private void bi_windup() { if (bi_valid > 8) { put_short(bi_buf); } else if (bi_valid > 0) { put_byte((byte)bi_buf); } bi_buf = 0; bi_valid = 0; }