Bytes extracts a variable-length byte slice from the Consumer. Uses a uint16 for the length prefix, limiting slices to 65535 bytes.
()
| 94 | // Bytes extracts a variable-length byte slice from the Consumer. |
| 95 | // Uses a uint16 for the length prefix, limiting slices to 65535 bytes. |
| 96 | func (c *Consumer) Bytes() []byte { |
| 97 | return c.take(int(c.Uint16())) |
| 98 | } |
| 99 | |
| 100 | // BytesN extracts exactly n bytes from the Consumer. |
| 101 | func (c *Consumer) BytesN(n int) []byte { |