MCPcopy Create free account
hub / github.com/google/gapid / Align

Method Align

gapis/memory/decoder.go:55–60  ·  view source on GitHub ↗

Align skips bytes until the read position is a multiple of to.

(to uint64)

Source from the content-addressed store, hash-verified

53
54// Align skips bytes until the read position is a multiple of to.
55func (d *Decoder) Align(to uint64) {
56 alignment := u64.AlignUp(d.o, uint64(to))
57 if pad := alignment - d.o; pad != 0 {
58 d.Skip(pad)
59 }
60}
61
62// Skip skips n bytes from the reader.
63func (d *Decoder) Skip(n uint64) {

Callers 3

alignAndOffsetMethod · 0.95
decodeFunction · 0.45
encodeFunction · 0.45

Calls 2

SkipMethod · 0.95
AlignUpMethod · 0.80

Tested by

no test coverage detected