Decode i64 values from a cascading pipeline.
(data: &[u8], codec: ColumnCodec)
| 125 | |
| 126 | /// Decode i64 values from a cascading pipeline. |
| 127 | pub fn decode_i64_pipeline(data: &[u8], codec: ColumnCodec) -> Result<Vec<i64>, CodecError> { |
| 128 | match codec { |
| 129 | // Cascading — lz4 terminal. |
| 130 | ColumnCodec::DeltaFastLanesLz4 => decode_delta_fastlanes_lz4(data), |
| 131 | ColumnCodec::FastLanesLz4 => decode_fastlanes_lz4_i64(data), |
| 132 | ColumnCodec::PcodecLz4 => { |
| 133 | let pco_bytes = crate::lz4::decode(data)?; |
| 134 | crate::pcodec::decode_i64(&pco_bytes) |
| 135 | } |
| 136 | // Cascading — rANS terminal. |
| 137 | ColumnCodec::DeltaFastLanesRans => decode_delta_fastlanes_rans(data), |
| 138 | // Single-step codecs (small partitions / non-ALP-encodable data). |
| 139 | ColumnCodec::DoubleDelta => crate::double_delta::decode(data), |
| 140 | ColumnCodec::Delta => crate::delta::decode(data), |
| 141 | ColumnCodec::Gorilla => crate::gorilla::decode_timestamps(data), |
| 142 | ColumnCodec::Raw => { |
| 143 | let raw = crate::raw::decode(data)?; |
| 144 | raw_to_i64(&raw) |
| 145 | } |
| 146 | ColumnCodec::Lz4 => { |
| 147 | let raw = crate::lz4::decode(data)?; |
| 148 | raw_to_i64(&raw) |
| 149 | } |
| 150 | ColumnCodec::Zstd => { |
| 151 | let raw = crate::zstd_codec::decode(data)?; |
| 152 | raw_to_i64(&raw) |
| 153 | } |
| 154 | _ => crate::delta::decode(data), |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | /// Decode f64 values from a cascading pipeline. |
| 159 | pub fn decode_f64_pipeline(data: &[u8], codec: ColumnCodec) -> Result<Vec<f64>, CodecError> { |