code: func (r *AllocationBitmap) Restore(rangeSpec string, data []byte) error {
  	r.lock.Lock()
  	defer r.lock.Unlock()
  
  	if r.rangeSpec != rangeSpec {
  		return errors.New("the provided range does not match the current range")
  	}
  
  	r.allocated = big.NewInt(0).SetBytes(data)
  	r.count = countBits(r.allocated)
  
  	return nil
  }
docs: // Restore restores the pool to the previously captured state.