pub fn validate_offset(offset: u64, total_size: usize) -> Result<(), String>
Validate byte offset and size