diff --git a/crates/model-format/src/kar.rs b/crates/model-format/src/kar.rs index 8c85c12c..7b2d2058 100644 --- a/crates/model-format/src/kar.rs +++ b/crates/model-format/src/kar.rs @@ -1258,21 +1258,6 @@ fn read_at(file: &File, offset: u64, buffer: &mut [u8]) -> Result<(), KarError> Ok(()) } -/// Read exactly `buf.len()` bytes at absolute offset `at`: one `pread` on unix (the PLE row reader issues ~50 reads -/// per decoded token; a seek + read pair doubled the system calls and left the file offset moving). -fn read_at(file: &mut File, at: u64, buf: &mut [u8]) -> Result<(), KarError> { - #[cfg(unix)] - { - use std::os::unix::fs::FileExt; - file.read_exact_at(buf, at).map_err(KarError::Io) - } - #[cfg(not(unix))] - { - file.seek(SeekFrom::Start(at)).map_err(KarError::Io)?; - file.read_exact(buf).map_err(KarError::Io) - } -} - #[path = "kar_nested.rs"] mod nested; pub use nested::{KarNestedRecord, NESTING_TOPDOWN};