MCPcopy
hub / github.com/segmentio/kafka-go / readCompactString

Method readCompactString

protocol/decode.go:247–253  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

245}
246
247func (d *decoder) readCompactString() string {
248 if n := d.readUnsignedVarInt(); n < 1 {
249 return ""
250 } else {
251 return bytesToString(d.read(int(n - 1)))
252 }
253}
254
255func (d *decoder) readBytes() []byte {
256 if n := d.readInt32(); n < 0 {

Callers 1

decodeCompactStringMethod · 0.95

Calls 3

readUnsignedVarIntMethod · 0.95
readMethod · 0.95
bytesToStringFunction · 0.70

Tested by

no test coverage detected