Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › compress › flate › Decompress › init Public Function init Doc Source Public Function std.compress.flate.Decompress.init
pub fn init (input : *Reader , container : Container , buffer : []u8 ) Decompress Params File compress/flate/Decompress.zig: 85
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103 pub fn init (input : *Reader , container : Container , buffer : []u8 ) Decompress {
if (buffer .len != 0 ) assert (buffer .len >= flate .max_window_len );
return .{
.reader = .{
.vtable = if (buffer .len == 0 ) &direct_vtable else &indirect_vtable ,
.buffer = buffer ,
.seek = 0 ,
.end = 0 ,
},
.input = input ,
.consumed_bits = 0 ,
.container_metadata = .init (container ),
.lit_dec = .{},
.dst_dec = .{},
.final_block = false ,
.state = .protocol_header ,
.err = null ,
};
}
inputbuffer is asserted to be at least 10 bytes, or EOF before then.If
bufferis provided then asserted to haveflate.max_window_lencapacity.