pub fn update(h: *Hasher, buf: []const u8) void h: *Hasherbuf: []const u8106
107
108
109
110
111
112
113
114
115
116
117 pub fn update(h: *Hasher, buf: []const u8) void {
switch (h.*) {
.raw => {},
.gzip => |*gzip| {
gzip.crc.update(buf);
gzip.count +%= @truncate(buf.len);
},
.zlib => |*zlib| {
zlib.update(buf);
},
}
}