Skip to main content

pamoja_cdr_reader_new

Function pamoja_cdr_reader_new 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_cdr_reader_new( data: *const u8, data_len: usize, ) -> *mut PamojaCdrReader
Expand description

Creates a CDR decoder over encoded bytes.

§Arguments

  • data - the encoded bytes, which are copied.
  • data_len - the length of data.

§Returns

A handle the caller must release with pamoja_cdr_reader_free, or null if the bytes carry no valid encapsulation header.

§Safety

data must point to at least data_len readable bytes, or be null when that length is 0.