MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ probe()

bool MayaFlux::IO::SafetensorsReader::probe ( std::span< const std::byte > head,
uint64_t file_size )
staticnodiscard

Whether leading bytes and file size look like a safetensors header.

Definition at line 45 of file SafetensorsFormat.cpp.

46{
47 if (head.size() < 9 || file_size < 9)
48 return false;
49 const uint64_t header_size = read_le64(head.data());
50 return header_size > 0 && header_size <= max_header_bytes && header_size <= file_size - 8
51 && head[8] == std::byte { '{' };
52}

Referenced by can_read(), and register_with_registry().

Here is the caller graph for this function: