MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / bytesum

Function bytesum

rust/stringzilla.rs:854–862  ·  view source on GitHub ↗
(text: T)

Source from the content-addressed store, hash-verified

852/// A `u64` representing the checksum value of the input byte slice.
853#[inline(always)]
854pub fn bytesum<T>(text: T) -> u64
855where
856 T: AsRef<[u8]>,
857{
858 let text_ref = text.as_ref();
859 let text_pointer = text_ref.as_ptr() as _;
860 let text_length = text_ref.len();
861 unsafe { sz_bytesum(text_pointer, text_length) }
862}
863
864/// Moves the contents of `source` into `target`, overwriting the existing contents of `target`.
865/// This function is useful for scenarios where you need to replace the contents of a byte slice

Callers 1

sz_bytesumMethod · 0.85

Calls 3

as_ptrMethod · 0.80
lenMethod · 0.80
sz_bytesumFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…