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 › lzma2 › Decode › parseUncompressed Private Function parseUncompressed Doc Source Private Function std.compress.lzma2.Decode.parseUncompressed
fn parseUncompressed (
reader : *Reader ,
allocating : *Writer .Allocating ,
accum : *AccumBuffer ,
reset_dict : bool ,
) !usize Params File compress/lzma2.zig: 247
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263 fn parseUncompressed (
reader : *Reader ,
allocating : *Writer .Allocating ,
accum : *AccumBuffer ,
reset_dict : bool ,
) !usize {
const unpacked_size = @as (u17 , try reader .takeInt (u16 , .big )) + 1 ;
if (reset_dict ) try accum .reset (&allocating .writer );
const gpa = allocating .allocator ;
for (0 ..unpacked_size ) |_ | {
try accum .appendByte (gpa , try reader .takeByte ());
}
return 2 + unpacked_size ;
}