MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / decode_i64_pipeline

Function decode_i64_pipeline

nodedb-codec/src/pipeline.rs:127–156  ·  view source on GitHub ↗

Decode i64 values from a cascading pipeline.

(data: &[u8], codec: ColumnCodec)

Source from the content-addressed store, hash-verified

125
126/// Decode i64 values from a cascading pipeline.
127pub 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.
159pub fn decode_f64_pipeline(data: &[u8], codec: ColumnCodec) -> Result<Vec<f64>, CodecError> {

Callers 8

fastlanes_lz4_symbol_idsFunction · 0.85
legacy_codecs_still_workFunction · 0.85
empty_valuesFunction · 0.85
decode_blockFunction · 0.85
decode_columnFunction · 0.85

Calls 7

decode_fastlanes_lz4_i64Function · 0.85
decode_i64Function · 0.85
decode_timestampsFunction · 0.85
raw_to_i64Function · 0.85
decodeFunction · 0.70

Tested by 6

fastlanes_lz4_symbol_idsFunction · 0.68
legacy_codecs_still_workFunction · 0.68
empty_valuesFunction · 0.68