private static int GET_BITS(int nbits, int get_buffer, ref int bits_left) { return (((int)(get_buffer >> (bits_left -= nbits))) & bmask[nbits]); }