code: function countZeros(buf) {
  	var o = 0, obit = 8;
  	while (o < buf.length) {
  		var mask = (1 << obit);
  		if ((buf[o] & mask) === mask)
  			break;
  		obit--;
  		if (obit < 0) {
  			o++;
  			obit = 8;
  		}
  	}
  	return (o*8 + (8 - obit) - 1);
  }
docs: /* Count leading zero bits on a buffer