align aligns the input to the given boundary and panics on error.
(n int)
| 45 | |
| 46 | // align aligns the input to the given boundary and panics on error. |
| 47 | func (dec *decoder) align(n int) { |
| 48 | if dec.pos%n != 0 { |
| 49 | newpos := (dec.pos + n - 1) & ^(n - 1) |
| 50 | dec.read2buf(newpos - dec.pos) |
| 51 | dec.pos = newpos |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | // Calls binary.Read(dec.in, dec.order, v) and panics on read errors. |
| 56 | func (dec *decoder) binread(v any) { |
no test coverage detected