Skip to main content

build_views

Function build_views 

Source
pub fn build_views<P: NativePType + AsPrimitive<usize>>(
    start_buf_index: u32,
    max_buffer_len: usize,
    bytes: ByteBufferMut,
    lens: &[P],
) -> (Vec<ByteBuffer>, Buffer<BinaryView>)
Expand description

Split a large buffer of input bytes holding string data into VarBinView buffers and views.

max_buffer_len must not exceed MAX_BUFFER_LEN, since every view offset is stored in a u32 and offsets are bounded by max_buffer_len.