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 Function

hashLong

Private Function
std.hash.xxhash.XxHash3.hashLong
noinline fn hashLong(seed: u64, input: []const u8) u64

Params

  • seed: u64
  • input: []const u8

File

hash/xxhash.zig:685
685
686
687
688
689
690
691
692
693
694
695
    noinline fn hashLong(seed: u64, input: []const u8) u64 {
        @branchHint(.unlikely);
        std.debug.assert(input.len >= 240);

        const block_count = ((input.len - 1) / block_bytes) * block_bytes;
        const last_block = input[input.len - block_bytes ..][0..block_bytes];

        var acc = Accumulator.init(seed);
        acc.consume(std.mem.bytesAsSlice(InputBlock, input[0..block_count]));
        return acc.digest(input.len, @ptrCast(last_block));
    }