NewDecoder initializes a new Protobuf decoder to read the provided buffer.
(p []byte)
| 65 | |
| 66 | // NewDecoder initializes a new Protobuf decoder to read the provided buffer. |
| 67 | func NewDecoder(p []byte) *Decoder { |
| 68 | return &Decoder{ |
| 69 | p: p, |
| 70 | offset: 0, |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | // Mode returns the current decoding mode, safe vs fastest. |
| 75 | func (d *Decoder) Mode() DecoderMode { |
no outgoing calls