UseArrayEncodedStructs causes the Encoder to encode Go structs as msgpack arrays.
(on bool)
| 160 | |
| 161 | // UseArrayEncodedStructs causes the Encoder to encode Go structs as msgpack arrays. |
| 162 | func (e *Encoder) UseArrayEncodedStructs(on bool) { |
| 163 | if on { |
| 164 | e.flags |= arrayEncodedStructsFlag |
| 165 | } else { |
| 166 | e.flags &= ^arrayEncodedStructsFlag |
| 167 | } |
| 168 | } |
| 169 | |
| 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. |
no outgoing calls