Decode f64 values from a cascading pipeline.
(data: &[u8], codec: ColumnCodec)
| 157 | |
| 158 | /// Decode f64 values from a cascading pipeline. |
| 159 | pub fn decode_f64_pipeline(data: &[u8], codec: ColumnCodec) -> Result<Vec<f64>, CodecError> { |
| 160 | match codec { |
| 161 | // Cascading — lz4 terminal. |
| 162 | ColumnCodec::AlpFastLanesLz4 => decode_alp_fastlanes_lz4(data), |
| 163 | ColumnCodec::AlpRdLz4 => { |
| 164 | let alp_rd_bytes = crate::lz4::decode(data)?; |
| 165 | crate::alp_rd::decode(&alp_rd_bytes) |
| 166 | } |
| 167 | ColumnCodec::PcodecLz4 => { |
| 168 | let pco_bytes = crate::lz4::decode(data)?; |
| 169 | crate::pcodec::decode_f64(&pco_bytes) |
| 170 | } |
| 171 | // Cascading — rANS terminal. |
| 172 | ColumnCodec::AlpFastLanesRans => decode_alp_fastlanes_rans(data), |
| 173 | // Single-step codecs (small partitions / non-ALP-encodable data). |
| 174 | ColumnCodec::Gorilla => crate::gorilla::decode_f64(data), |
| 175 | ColumnCodec::Raw => { |
| 176 | let raw = crate::raw::decode(data)?; |
| 177 | raw_to_f64(&raw) |
| 178 | } |
| 179 | ColumnCodec::Lz4 => { |
| 180 | let raw = crate::lz4::decode(data)?; |
| 181 | raw_to_f64(&raw) |
| 182 | } |
| 183 | ColumnCodec::Zstd => { |
| 184 | let raw = crate::zstd_codec::decode(data)?; |
| 185 | raw_to_f64(&raw) |
| 186 | } |
| 187 | _ => crate::gorilla::decode_f64(data), |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | /// Decode raw bytes (symbol columns or string data) from a pipeline. |
| 192 | pub fn decode_bytes_pipeline(data: &[u8], codec: ColumnCodec) -> Result<Vec<u8>, CodecError> { |