Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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. Private Struct

Node

Private Struct
std.compress.flate.Compress.huffman.Node
const Node = packed struct(u32)

Fields

depth: u16
freq: u16

Values

Functions

pub fn smaller(a: Node, b: Node) bool

freq is more significant than depth

File

compress/flate/Compress.zig:1066
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
    const Node = packed struct(u32) {
        depth: u16,
        freq: u16,

        pub const Index = u16;

        /// `freq` is more significant than `depth`
        pub fn smaller(a: Node, b: Node) bool {
            return @as(u32, @bitCast(a)) < @as(u32, @bitCast(b));
        }
    }