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 library itself.
Zig › std/ › compress/ › flate/ › token.zig › fixed_lit
fixed_lit
token.fixed_lit
const fixed_lit = blk :
File
Code
const fixed_lit = blk : {
var codes : [286 ]u16 = undefined ;
var bits : [286 ]u4 = undefined ;
for (0 ..143 + 1 , 0b00110000 ..0b10111111 + 1 ) |i , v | {
codes [i ] = @bitReverse (@as (u8 , v ));
bits [i ] = 8 ;
}
for (144 ..255 + 1 , 0b110010000 ..0b111111111 + 1 ) |i , v | {
codes [i ] = @bitReverse (@as (u9 , v ));
bits [i ] = 9 ;
}
for (256 ..279 + 1 , 0b0000000 ..0b0010111 + 1 ) |i , v | {
codes [i ] = @bitReverse (@as (u7 , v ));
bits [i ] = 7 ;
}
for (280 ..287 - 2 + 1 , 0b11000000 ..0b11000111 - 2 + 1 ) |i , v | {
codes [i ] = @bitReverse (@as (u8 , v ));
bits [i ] = 8 ;
}
break :blk .{ codes , bits };
}