MCPcopy
hub / github.com/uber/aresdb / AlignBytes

Method AlignBytes

utils/serialization.go:135–141  ·  view source on GitHub ↗

AlignBytes aligns the offset/bit offset to the next byte specified in alignment. The new offset may cross the buffer boundary.

(alignment int)

Source from the content-addressed store, hash-verified

133// AlignBytes aligns the offset/bit offset to the next byte specified in alignment.
134// The new offset may cross the buffer boundary.
135func (b *BufferWriter) AlignBytes(alignment int) {
136 if b.bitOffset > 0 {
137 b.offset++
138 b.bitOffset = 0
139 }
140 b.offset = AlignOffset(b.offset, alignment)
141}
142
143// SkipBytes moves the underline offset by specified bytes.
144// The new offset may cross the buffer boundary.

Callers 15

SkipBytesMethod · 0.95
AppendInt8Method · 0.95
AppendUint8Method · 0.95
AppendInt16Method · 0.95
AppendUint16Method · 0.95
AppendInt32Method · 0.95
AppendInt64Method · 0.95
AppendUint32Method · 0.95
AppendUint64Method · 0.95
AppendFloat32Method · 0.95
AppendMethod · 0.95
SerializeHeaderMethod · 0.95

Calls 1

AlignOffsetFunction · 0.85

Tested by

no test coverage detected