Size returns the size in bytes of the wire-format encoding of m.
(m Message)
| 11 | |
| 12 | // Size returns the size in bytes of the wire-format encoding of m. |
| 13 | func Size(m Message) int { |
| 14 | if m == nil { |
| 15 | return 0 |
| 16 | } |
| 17 | mi := MessageV2(m) |
| 18 | return protoV2.Size(mi) |
| 19 | } |
| 20 | |
| 21 | // Marshal returns the wire-format encoding of m. |
| 22 | func Marshal(m Message) ([]byte, error) { |