Example 1 · empty
- Arguments
- chunks
[]
maxFrame16
- Expected return
{ "frames": [], "remaining": [], "error": "" }
Test data
- Input
{"chunks":[],"maxFrame":16}- Expected output
{"frames":[],"remaining":[],"error":""}
func DecodeFrames(chunks [][]byte, maxFrame int) DecodeResultFrames [][]byteRemaining []byteError stringThe runner calls your functions directly; you do not need to parse JSON.
[]
16
{
"frames": [],
"remaining": [],
"error": ""
}{"chunks":[],"maxFrame":16}{"frames":[],"remaining":[],"error":""}[
[
0
],
[
2,
65
],
[
66,
0,
0
]
]4
{
"frames": [
[
65,
66
],
[]
],
"remaining": [],
"error": ""
}{"chunks":[[0],[2,65],[66,0,0]],"maxFrame":4}{"frames":[[65,66],[]],"remaining":[],"error":""}[
[
0,
1,
0,
0
]
]1
{
"frames": [
[
0
]
],
"remaining": [
0
],
"error": ""
}{"chunks":[[0,1,0,0]],"maxFrame":1}{"frames":[[0]],"remaining":[0],"error":""}[
[
0,
1,
65,
0,
3
],
[
9
],
[
9,
9
]
]2
{
"frames": [
[
65
]
],
"remaining": [
0,
3,
9,
9,
9
],
"error": "frame_too_large"
}{"chunks":[[0,1,65,0,3],[9],[9,9]],"maxFrame":2}{"frames":[[65]],"remaining":[0,3,9,9,9],"error":"frame_too_large"}Checking execution availability…
View inputs and expected outputs. Examples do not run your code.