Msgsize returns the maximum size of the message.
()
| 962 | |
| 963 | // Msgsize returns the maximum size of the message. |
| 964 | func (s Byte) Msgsize() int { |
| 965 | if s == nil { |
| 966 | return msgp.NilSize |
| 967 | } |
| 968 | size := msgp.ArrayHeaderSize |
| 969 | size += len(s) * msgp.ByteSize |
| 970 | return size |
| 971 | } |
| 972 | |
| 973 | // ByteFromSlice creates a Byte from a slice. |
| 974 | func ByteFromSlice(s []byte) Byte { |