MCPcopy
hub / github.com/RoaringBitmap/roaring / ByteInput

Interface ByteInput

internal/byte_input.go:9–26  ·  view source on GitHub ↗

ByteInput typed interface around io.Reader or raw bytes

Source from the content-addressed store, hash-verified

7
8// ByteInput typed interface around io.Reader or raw bytes
9type ByteInput interface {
10 // Next returns a slice containing the next n bytes from the buffer,
11 // advancing the buffer as if the bytes had been returned by Read.
12 Next(n int) ([]byte, error)
13 // NextReturnsSafeSlice returns true if Next() returns a safe slice as opposed
14 // to a slice that points to an underlying buffer possibly owned by another system.
15 // When NextReturnsSafeSlice returns false, the result from Next() should be copied
16 // before it is modified (i.e., it is immutable).
17 NextReturnsSafeSlice() bool
18 // ReadUInt32 reads uint32 with LittleEndian order
19 ReadUInt32() (uint32, error)
20 // ReadUInt16 reads uint16 with LittleEndian order
21 ReadUInt16() (uint16, error)
22 // GetReadBytes returns read bytes
23 GetReadBytes() int64
24 // SkipBytes skips exactly n bytes
25 SkipBytes(n int) error
26}
27
28// NewByteInputFromReader creates reader wrapper
29func NewByteInputFromReader(reader io.Reader) ByteInput {

Callers 8

readFromMethod · 0.65
readFromMethod · 0.65
TestByteInputFlowFunction · 0.65
readFromMethod · 0.65
TestByteInputFlowFunction · 0.65
readFromMethod · 0.65
readFromMethod · 0.65
TestByteInputFlowFunction · 0.65

Implementers 2

ByteBufferinternal/byte_input.go
ByteInputAdapterinternal/byte_input.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…