Msgsize returns the maximum size of the message.
()
| 1118 | |
| 1119 | // Msgsize returns the maximum size of the message. |
| 1120 | func (s ByteSorted) Msgsize() int { |
| 1121 | if s == nil { |
| 1122 | return msgp.NilSize |
| 1123 | } |
| 1124 | size := msgp.ArrayHeaderSize |
| 1125 | size += len(s) * msgp.ByteSize |
| 1126 | return size |
| 1127 | } |
| 1128 | |
| 1129 | // ByteSortedFromSlice creates a ByteSorted from a slice. |
| 1130 | func ByteSortedFromSlice(s []byte) ByteSorted { |