Msgsize returns the maximum size of the message.
()
| 392 | |
| 393 | // Msgsize returns the maximum size of the message. |
| 394 | func (s Int) Msgsize() int { |
| 395 | if s == nil { |
| 396 | return msgp.NilSize |
| 397 | } |
| 398 | size := msgp.ArrayHeaderSize |
| 399 | size += len(s) * msgp.IntSize |
| 400 | return size |
| 401 | } |
| 402 | |
| 403 | // IntFromSlice creates a Int from a slice. |
| 404 | func IntFromSlice(s []int) Int { |