AlignBytes aligns the offset/bit offset to the next byte specified in alignment. The new offset may cross the buffer boundary.
(alignment int)
| 133 | // AlignBytes aligns the offset/bit offset to the next byte specified in alignment. |
| 134 | // The new offset may cross the buffer boundary. |
| 135 | func (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. |
no test coverage detected