Align writes zero bytes until the write position is a multiple of to.
(to uint64)
| 51 | |
| 52 | // Align writes zero bytes until the write position is a multiple of to. |
| 53 | func (e *Encoder) Align(to uint64) { |
| 54 | alignment := u64.AlignUp(e.o, to) |
| 55 | if pad := alignment - e.o; pad != 0 { |
| 56 | e.Pad(pad) |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | // Pad writes n zero bytes to the writer. |
| 61 | func (e *Encoder) Pad(n uint64) { |
no test coverage detected