Byte Frame Chunk Rejoin Tool
Rejoin explicit bounded byte chunks and report each chunk’s half-open source span, preserving empty-chunk provenance.
Description
Rejoin explicit bounded byte chunks and report each chunk’s half-open source span, preserving empty-chunk provenance.
Concatenating frame chunks should preserve both byte order and each chunk's location. Empty chunks retain a zero-length span.
When to use this tool
Rejoin explicit bounded byte chunks and report each chunk’s half-open source span, preserving empty-chunk provenance.
- Prepare the supplied chunksJson fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter chunksJson. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.bytes, result.spans. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Parse chunksJson as byte arrays, concatenate them and require at most 128 total bytes. Return each chunk's cumulative half-open [start, end) span.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| chunksJson | JSON text, entered as one text field. The decoded structure is illustrated below; it is not a separate file. | Text |
For the JSON text fields, the following decoded structures show the example records before they are serialized into input strings. Keep field names, list nesting and value types as shown.
[
{
"field": "chunksJson",
"decoded": [
[
1,
2
],
[],
[
3
]
]
}
] | Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.bytes | The bytes list in the ordering and representation described above. |
| result.spans | The spans list in the ordering and representation described above. |
{
"input": {
"chunksJson": "[[1,2],[],[3]]"
},
"output": {
"result": {
"bytes": [
1,
2,
3
],
"spans": [
[
0,
2
],
[
2,
2
],
[
2,
3
]
]
}
}
} Limitations and assumptions
- This does not infer frame boundaries, reorder chunks or detect missing transport data. Chunks are joined exactly as supplied.
- All declared input fields are required and unexpected top-level fields are rejected. Numbers must be finite; lists are limited to 128 entries and ordinary text fields to 8,192 UTF-16 code units, with tighter limits where stated.
- JSON text inputs must parse within bounded nesting and size limits. Numeric outputs outside the safe finite range are rejected; large exact integer results use decimal strings. Indexes and half-open spans are zero-based unless a rank is explicitly described as one-based.
Alternative or Complementary methods
Use a stateful protocol parser when processing partial streams or validating complete packets. Retain the declared prefix width, byte order and payload-versus-frame boundary convention when composing these operations.
References
Similar or alternative tools
- Byte Frame Chunk Carry Tool
Advance one fixed-byte streaming frame chunk with explicit incomplete carry, emitting complete frames and retaining the new tail; no sync search.
- Byte Frame Delimiter Coverage Check
Compare explicit byte delimiter observations against caller-declared boundary positions, retaining both undeclared delimiters and false boundary claims.