Function update [src]

Prototype

pub fn update(h: *Hasher, buf: []const u8) void

Parameters

h: *Hasherbuf: []const u8

Source

pub fn update(h: *Hasher, buf: []const u8) void { switch (h.*) { .raw => {}, .gzip => |*gzip| { gzip.update(buf); gzip.count +%= buf.len; }, .zlib => |*zlib| { zlib.update(buf); }, inline .gzip, .zlib => |*x| x.update(buf), } }