I noticed that in the source code for zig that there are some predefined CRC structs in (zig/lib/std/hash/crc.zig). I wrote a small test program to try to use them, but they don’t seem to be available in the way that I was expecting.
Compiling with 0.17.0-dev.1426+58a94eaae. I don’t really care about GSM, just an example.
const std = @import("std");
pub fn main() void {
const data = "Hello, GSM!";
const result = std.hash.Crc3Gsm.hash(data);
std.debug.print("CRC-3 GSM: {x}\n", .{result});
}
test.zig:5:29: error: root source file struct 'hash' has no member named 'Crc3Gsm'
const result = std.hash.Crc3Gsm.hash(data);