pub fn read_header_ranged(
src: &mut dyn RangeSource,
format: FileFormat,
stop: &dyn Fn() -> bool,
) -> Result<Header, RangeError>Expand description
Read one model header from src with ranged requests: SafeTensors as its first
FIRST_SAFETENSORS_RANGE and, when its JSON runs past that, the rest of the JSON
and no further; GGUF forward in growing ranges until its tensor infos end. Every
bound the file readers keep is kept. stop is asked before each request.