code: func (q *Quantity) CanonicalizeBytes(out []byte) (result, suffix []byte) {
  	if q.IsZero() {
  		return zeroBytes, nil
  	}
  
  	var rounded CanonicalValue
  	format := q.Format
  	switch format {
  	case DecimalExponent, DecimalSI:
  	case BinarySI:
  		if q.CmpInt64(-1024) > 0 && q.CmpInt64(1024) < 0 {
  			// This avoids rounding and hopefully confusion, too.
  			format = DecimalSI
  		} else {
  			var exact bool
  			if rounded, exact = q.AsScale(0); !exact {
  				// Don't lose precision-- show as DecimalSI
  				format = DecimalSI
  			}
  		}
  	default:
  		format = DecimalExponent
  	}
  
  	// TODO: If BinarySI formatting is requested but would cause rounding, upgrade to
  	// one of the other formats.
  	switch format {
  	case DecimalExponent, DecimalSI:
  		number, exponent := q.AsCanonicalBytes(out)
  		suffix, _ := quantitySuffixer.constructBytes(10, exponent, format)
  		return number, suffix
  	default:
  		// format must be BinarySI
  		number, exponent := rounded.AsCanonicalBase1024Bytes(out)
  		suffix, _ := quantitySuffixer.constructBytes(2, exponent*10, format)
  		return number, suffix
  	}
  }
docs: // CanonicalizeBytes returns the canonical form of q and its suffix (see comment on Quantity).
  //
  // Note about BinarySI:
  // * If q.Format is set to BinarySI and q.Amount represents a non-zero value between
  //   -1 and +1, it will be emitted as if q.Format were DecimalSI.
  // * Otherwise, if q.Format is set to BinarySI, fractional parts of q.Amount will be
  //   rounded up. (1.1i becomes 2i.)