@@ -42,7 +42,7 @@ use crate::spectrum::bindata::vec_as_bytes;
4242use numpress:: numpress_decompress;
4343
4444use crate :: spectrum:: spectrum_types:: MultiLayerSpectrum ;
45- use crate :: spectrum:: { Chromatogram , HasIonMobility , IsolationWindow , ScanWindow , SelectedIon } ;
45+ use crate :: spectrum:: { Chromatogram , HasIonMobility , IsolationWindow , ScanWindow , SelectedIon , Precursor } ;
4646
4747#[ derive( Debug , Error ) ]
4848pub enum MzMLbError {
@@ -266,9 +266,6 @@ impl ExternalDataRegistry {
266266 fn handle_encoding ( data : & mut DataArray ) -> Result < ( ) , ArrayRetrievalError > {
267267 match data. compression {
268268 BinaryCompressionType :: NoCompression => Ok ( ( ) ) ,
269- BinaryCompressionType :: Zlib => Err ( ArrayRetrievalError :: DecompressionError (
270- data. compression . unsupported_msg ( None ) ,
271- ) ) ,
272269 #[ cfg( feature = "numpress" ) ]
273270 BinaryCompressionType :: NumpressLinear => {
274271 match data. dtype {
@@ -290,25 +287,6 @@ impl ExternalDataRegistry {
290287 data. compression . unsupported_msg ( None ) ,
291288 ) )
292289 }
293- #[ cfg( not( feature = "numpress" ) ) ]
294- BinaryCompressionType :: NumpressLinear => Err ( ArrayRetrievalError :: DecompressionError (
295- data. compression . unsupported_msg ( None ) ,
296- ) ) ,
297- BinaryCompressionType :: NumpressSLOF => Err ( ArrayRetrievalError :: DecompressionError (
298- data. compression . unsupported_msg ( None ) ,
299- ) ) ,
300- BinaryCompressionType :: NumpressPIC => Err ( ArrayRetrievalError :: DecompressionError (
301- data. compression . unsupported_msg ( None ) ,
302- ) ) ,
303- BinaryCompressionType :: NumpressLinearZlib => Err (
304- ArrayRetrievalError :: DecompressionError ( data. compression . unsupported_msg ( None ) ) ,
305- ) ,
306- BinaryCompressionType :: NumpressSLOFZlib => Err (
307- ArrayRetrievalError :: DecompressionError ( data. compression . unsupported_msg ( None ) ) ,
308- ) ,
309- BinaryCompressionType :: NumpressPICZlib => Err ( ArrayRetrievalError :: DecompressionError (
310- data. compression . unsupported_msg ( None ) ,
311- ) ) ,
312290 BinaryCompressionType :: LinearPrediction => {
313291 match data. dtype {
314292 BinaryDataArrayType :: Float64 => {
@@ -354,6 +332,9 @@ impl ExternalDataRegistry {
354332 Ok ( ( ) )
355333 }
356334 BinaryCompressionType :: Decoded => Ok ( ( ) ) ,
335+ _ => Err ( ArrayRetrievalError :: DecompressionError (
336+ data. compression . unsupported_msg ( None ) ,
337+ ) )
357338 }
358339 }
359340
0 commit comments