···208208 let r = _hw_crc32c_bytes buf off len in
209209 if r >= 0 then r else C32.compute_bytes crc32c_tables buf off len
210210 else C32.compute_bytes crc32c_tables buf off len
211211+212212+(* Software-only variants for benchmarking *)
213213+let crc32_software data = C32.compute crc32_tables data
214214+let crc32c_software data = C32.compute crc32c_tables data
+12
lib/crc.mli
···40404141val crc32c_bytes : bytes -> int -> int -> int
4242(** [crc32c_bytes buf off len] computes CRC-32C over a sub-range of [buf]. *)
4343+4444+(** {1 Software-only variants}
4545+4646+ These always use the pure OCaml slicing-by-8 path, bypassing hardware
4747+ acceleration. Useful for benchmarking and for verifying that the software
4848+ and hardware paths agree. *)
4949+5050+val crc32_software : string -> int
5151+(** Like {!crc32} but always uses the software path. *)
5252+5353+val crc32c_software : string -> int
5454+(** Like {!crc32c} but always uses the software path. *)