Skip to main content

chunk_payload

Function chunk_payload 

Source
pub fn chunk_payload(chunks: &[(u32, &[u8])]) -> Vec<u8> ⓘ
Expand description

Lay chunks out as a GigE Vision chunk payload, in order: each chunk’s data, then its tag — chunk ID and data length, 32-bit big-endian each.

Written from the layout itself, with this crate’s own constants; it never calls the client’s parser (ADR-0019). A receiver reads it from the end. For an image with chunks (0x4001) the image is the first chunk.