code: func (db *DB) BitPos(key []byte, on int, start int, end int) (int64, error) {
  	if err := checkKeySize(key); err != nil {
  		return 0, err
  	}
  
  	if (on & ^1) != 0 {
  		return 0, fmt.Errorf("bit must be 0 or 1, not %d", on)
  	}
  
  	var skipValue uint8
  	if on == 0 {
  		skipValue = 0xFF
  	}
  
  	key = db.encodeKVKey(key)
  	value, err := db.bucket.Get(key)
  	if err != nil {
  		return 0, err
  	}
  
  	start, end = getRange(start, end, len(value))
  	value = value[start : end+1]
  
  	for i, v := range value {
  		if uint8(v) != skipValue {
  			for j := 0; j < 8; j++ {
  				isNull := uint8(v)&(1<<uint8(7-j)) == 0
  
  				if (on == 1 && !isNull) || (on == 0 && isNull) {
  					return int64((start+i)*8 + j), nil
  				}
  			}
  		}
  	}
  
  	return -1, nil
  }
docs: // BitPos returns the pos of the data.