gnss_qc/context/flate2.rs
1use rinex::Rinex;
2
3use crate::{error::Error, prelude::QcContext};
4
5use std::path::Path;
6
7#[cfg(feature = "sp3")]
8use crate::prelude::SP3;
9
10impl QcContext {
11 /// Load a Gzip compressed RINEX file from readable [Path].
12 pub fn load_gzip_rinex_file<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Error> {
13 let rinex = Rinex::from_gzip_file(&path)?;
14 self.load_rinex(path, rinex)
15 }
16
17 #[cfg(feature = "sp3")]
18 #[cfg_attr(docsrs, doc(cfg(feature = "sp3")))]
19 /// Load a Gzip compressed [SP3] file from readable [Path].
20 pub fn load_gzip_sp3_file<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Error> {
21 let sp3 = SP3::from_gzip_file(&path)?;
22 self.load_sp3(path, sp3)
23 }
24}