Function init [src]
Prototype
pub fn init(output: *Writer, buffer: []u8, container: Container, strategy: Strategy) !Simple Parameters
output: *Writerbuffer: []u8container: Containerstrategy: Strategy Source
pub fn init(output: *Writer, buffer: []u8, container: Container, strategy: Strategy) !Simple {
const header = container.header();
try output.writeAll(header);
return .{
.buffer = buffer,
.wp = 0,
.block_writer = .init(output),
.hasher = .init(container),
.strategy = strategy,
};
}