Description
Use the longest as outputLength and subtract each source length from it for fills.
Zipping lists can stop at the shortest input or extend to the longest with fill values. Those policies trade discarded tails against missing-position padding.
Use the longest as outputLength and subtract each source length from it for fills.
When to use this tool
Use List Zip Longest Fill Budget when you need to compare zip output lengths and per-list losses or fills.
How to use the tool and how it works
- Enter lengths. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read outputLength, fills. Use the output convention below.
Require a nonempty list of nonnegative integer lengths. Use the longest as outputLength and subtract each source length from it for fills.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| lengths | Lengths | Required. Array of safe integer; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| outputLength | Output Length | Required. Safe integer. |
| fills | Fills | Required. Array of safe integer; maximum items 256. |
{
"input": {
"lengths": [
3,
5,
4
]
},
"output": {
"outputLength": 5,
"fills": [
2,
0,
1
]
}
} Limitations and assumptions
- This counts required fill positions without choosing fill values or constructing zipped records.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Choose a missing-value and alignment policy before actually combining records from unequal lists.
References
Similar or alternative tools
- List Zip Shortest Tail Loss
Use the shortest as outputLength and subtract it from each source length for discarded.
- List Window Centered Padding Budget
For a valid center and nonnegative radius, return max(0, radius - center) left padding and max(0, center + radius - length + 1) right padding.