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

◆ probe()

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

Whether the leading bytes are the numpy magic string.

Definition at line 23 of file NpyFormat.cpp.

24{
25 std::string why;
26 return head.size() >= 10 && Detail::npy_prefix_size(head.first(std::min<size_t>(head.size(), 12)), why).has_value();
27}
std::optional< size_t > npy_prefix_size(std::span< const std::byte > leading, std::string &why)
Total prefix size (magic, version, length field and header) of a .npy array.
Definition NpyCodec.cpp:107

References MayaFlux::IO::Detail::npy_prefix_size().

Referenced by can_read(), and register_with_registry().

Here is the call graph for this function:
Here is the caller graph for this function: