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, or PamojaStatus::InvalidArgument if scale is not positive and finite.

§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.