EncodeString writes a length-delimited string value to the buffer preceded by the varint-encoded tag key.
(tag int, s string)
| 34 | |
| 35 | // EncodeString writes a length-delimited string value to the buffer preceded by the varint-encoded tag key. |
| 36 | func (e *Encoder) EncodeString(tag int, s string) { |
| 37 | b := e.stringToBytes(s) |
| 38 | e.EncodeBytes(tag, b) |
| 39 | } |
| 40 | |
| 41 | // EncodeBytes writes a length-delimited byte slice to the buffer preceded by the varint-encoded tag key. |
| 42 | func (e *Encoder) EncodeBytes(tag int, v []byte) { |