MCPcopy Index your code
hub / github.com/vmihailenco/msgpack / UseCompactInts

Method UseCompactInts

encode.go:172–178  ·  view source on GitHub ↗

UseCompactEncoding causes the Encoder to chose the most compact encoding. For example, it allows to encode small Go int64 as msgpack int8 saving 7 bytes.

(on bool)

Source from the content-addressed store, hash-verified

170// UseCompactEncoding causes the Encoder to chose the most compact encoding.
171// For example, it allows to encode small Go int64 as msgpack int8 saving 7 bytes.
172func (e *Encoder) UseCompactInts(on bool) {
173 if on {
174 e.flags |= useCompactIntsFlag
175 } else {
176 e.flags &= ^useCompactIntsFlag
177 }
178}
179
180// UseCompactFloats causes the Encoder to chose a compact integer encoding
181// for floats that can be represented as integers.

Callers 4

TestEncoderFunction · 0.95
TestFloatEncodingFunction · 0.95
TestUint64Function · 0.95
TestInt64Function · 0.95

Calls

no outgoing calls

Tested by 4

TestEncoderFunction · 0.76
TestFloatEncodingFunction · 0.76
TestUint64Function · 0.76
TestInt64Function · 0.76