// AddInt16KeyOmitEmpty adds an int16 to be encoded and skips it if its value is 0.
// Must be used inside an object as it will encode a key.
4027
func (enc *Encoder) AddInt16KeyOmitEmpty(key string, v int16) {
	enc.Int64KeyOmitEmpty(key, int64(v))
}
921798
func (enc *Encoder) AddFloat32KeyNullEmpty(key string, v float32) {
	enc.Float32KeyNullEmpty(key, v)
}
578001
func ConvertInt16(str string) (int16, error) {
	i, err := strconv.ParseInt(str, 10, 16)
	if err != nil {
		return 0, err
	}
	return int16(i), nil
}
980483
func (g *Group) Int16() *Statement {
	// notest
	s := Int16()
	g.items = append(g.items, s)
	return s
}
139899
func Int16(v int16) *int16 {
	p := new(int16)
	*p = v
	return p
}
847375
func (enc *Encoder) AddFloat32KeyOmitEmpty(key string, v float32) {
	enc.Float32KeyOmitEmpty(key, v)
}
429728
func (Encoder) AppendInt64(dst []byte, val int64) []byte {
	return strconv.AppendInt(dst, val, 10)
}
250435
func (enc *Encoder) AddFloatKeyOmitEmpty(key string, v float64) {
	enc.Float64KeyOmitEmpty(key, v)
}
942863
func (r *Encoder) EncodeInt16(x int16) error {
	_, err := r.w.Write([]byte{CHR_INT2})
	if err != nil {
		return err
	}
	return binary.Write(r.w, binary.BigEndian, x)
}
116517
func (enc *Encoder) AddInt64KeyOmitEmpty(key string, v int64) {
	enc.Int64KeyOmitEmpty(key, v)
}
1283285
func (Encoder) AppendInt64(dst []byte, val int64) []byte {
	major := majorTypeUnsignedInt
	contentVal := val
	if val < 0 {
		major = majorTypeNegativeInt
		contentVal = -val - 1
	}
	if contentVal <= additionalMax {
		lb := byte(contentVal)
		dst = append(dst, byte(major|lb))
	} else {
		dst = appendCborTypePrefix(dst, major, uint64(contentVal))
	}
	return dst
}
590115
func (enc *Encoder) AddUint32KeyOmitEmpty(key string, v uint32) {
	enc.Uint64KeyOmitEmpty(key, uint64(v))
}
70422
func (enc *Encoder) Float64KeyOmitEmpty(key string, v float64) {
	if enc.hasKeys {
		if !enc.keyExists(key) {
			return
		}
	}
	if v == 0 {
		return
	}
	enc.grow(10 + len(key))
	r := enc.getPreviousRune()
	if r != '{' {
		enc.writeByte(',')
	}
	enc.writeByte('"')
	enc.writeStringEscape(key)
	enc.writeBytes(objKey)
	enc.buf = strconv.AppendFloat(enc.buf, v, 'f', -1, 64)
}
1083769
func (enc *Encoder) AddInt32Key(key string, v int32) {
	enc.Int64Key(key, int64(v))
}
1363684
func (enc *Encoder) AddStringKeyNullEmpty(key, v string) {
	enc.StringKeyNullEmpty(key, v)
}
983496
func (enc *Encoder) Float32OmitEmpty(v float32) {
	if v == 0 {
		return
	}
	enc.grow(10)
	r := enc.getPreviousRune()
	if r != '[' {
		enc.writeByte(',')
	}
	enc.buf = strconv.AppendFloat(enc.buf, float64(v), 'f', -1, 32)
}
575789
func (c Context) Uints16(key string, i []uint16) Context {
	c.l.context = enc.AppendUints16(enc.AppendKey(c.l.context, key), i)
	return c
}