Decbuf provides safe methods to extract data from a byte slice. It does all necessary bounds checking and advancing of the byte slice. Several datums can be extracted without checking for errors. However, before using any datum, the err() method must be checked.
| 109 | // Several datums can be extracted without checking for errors. However, before using |
| 110 | // any datum, the err() method must be checked. |
| 111 | type Decbuf struct { |
| 112 | B []byte |
| 113 | E error |
| 114 | } |
| 115 | |
| 116 | // NewDecbufAt returns a new decoding buffer. It expects the first 4 bytes |
| 117 | // after offset to hold the big endian encoded content length, followed by the contents and the expected |
nothing calls this directly
no outgoing calls
no test coverage detected