Function init [src]
Prototype
pub fn init(output: *Writer, buffer: []u8, options: Options) Compress Parameters
output: *Writerbuffer: []u8options: Options Source
pub fn init(output: *Writer, buffer: []u8, options: Options) Compress {
return .{
.block_writer = .init(output),
.level = .get(options.level),
.hasher = .init(options.container),
.state = .header,
.writer = .{
.buffer = buffer,
.vtable = &.{ .drain = drain },
},
};
}