Worked example
Request count: 2
Inputs
- Serialized bytes per record in order: 200,200,400,100
- Maximum records per request: 2
- Maximum request bytes: 600
- Fixed envelope bytes per request: 50
Packs consecutive records without reordering using the next-fit rule.
Use the units shown.
Scan records in order, starting a new request when adding a record would exceed either cap.
Report the first and last 1-based record index in each request.
Envelope bytes plus all serialized record bytes in each request.
Packs consecutive records without reordering using the next-fit rule. Each record size must include its serialization separators; the envelope is added once per request. This feasible packing is not an optimal reordering solver.
OpenStax: percentages and proportions ↗Request count: 2
Request count: 1