Sequence Fit

std/flow/byte::Fit


Inputs

value: Stream<byte>
size: Stream<u64>

Outputs

↦ value: Stream<Vec<byte>>


Creates stream of vectors based on requested sizes.

For each size received, a vector with the same number of values is sent through pattern.

graph LR
    T("Fit()")
    V["… 🟦 🟦 🟦 🟦 🟦 🟦 …"] -->|value| T
    S["… 2️⃣ 1️⃣ 3️⃣ …"] -->|size| T
    
    T -->|value| P["…[🟦 🟦][🟦][🟦 🟦 🟦]…"]

    style V fill:#ffff,stroke:#ffff
    style S fill:#ffff,stroke:#ffff
    style P fill:#ffff,stroke:#ffff