Skip to main content

pamoja_codec_quantizer_decode

Function pamoja_codec_quantizer_decode 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_codec_quantizer_decode( scale: f32, bytes: *const u8, bytes_len: usize, out_readings: *mut *mut PamojaReadings, ) -> PamojaStatus
Expand description

Decodes a quantized batch back into float readings.

The readings come back to within the precision scale selected, which must be the same scale the batch was encoded with.

§Returns

PamojaStatus::Ok on success, with *out_readings set to a new handle the caller must release with pamoja_readings_free, or PamojaStatus::Codec if the buffer is malformed.

§Safety

bytes must point to at least bytes_len readable bytes, or be null when bytes_len is 0, and out_readings must point to a writable *mut PamojaReadings.