popWithState
Standalone function for working with a fixed-size buffer.
Function parameters
Parameters
- buf:[]const u8
- bit_len:*usize
Functions in this namespace
Functions
- pushWithStateAssumeCapacity
- Standalone function for working with a fixed-size buffer.
- peekWithState
- Standalone function for working with a fixed-size buffer.
- popWithState
- Standalone function for working with a fixed-size buffer.
Source
Implementation
pub fn popWithState(buf: []const u8, bit_len: *usize) u1 {
const b = peekWithState(buf, bit_len.*);
bit_len.* -= 1;
return b;
}