Skip to main content

pamoja_codec_quantizer_encode

Function pamoja_codec_quantizer_encode 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_codec_quantizer_encode( scale: f32, readings: *const f32, count: usize, out_buffer: *mut *mut PamojaBuffer, ) -> PamojaStatus
Expand description

Quantizes and delta-encodes a batch of float readings.

§Returns

PamojaStatus::Ok on success, with *out_buffer set to a new buffer handle the caller must release with pamoja_buffer_free, PamojaStatus::InvalidArgument if scale is not positive and finite, or PamojaStatus::Codec if a reading is not a number, is infinite, or is too large for the scale; the format has no way to carry a missing reading.

§Safety

readings must point to at least count readable float values, or be null when count is 0, and out_buffer must point to a writable *mut PamojaBuffer.