@moqtap/codec 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +16 -4
  3. package/dist/{chunk-5XZKO2U5.js → chunk-2XH6PHXR.js} +62 -51
  4. package/dist/{chunk-BQHLUT37.cjs → chunk-7ENEWAMZ.cjs} +2 -6
  5. package/dist/chunk-BMJMY6FX.cjs +868 -0
  6. package/dist/{chunk-MD2OA7SE.js → chunk-BV6MITLO.js} +15 -8
  7. package/dist/{chunk-B56AG5HU.cjs → chunk-EVCPBFSR.cjs} +6 -4
  8. package/dist/{chunk-KNLPX3YA.js → chunk-H6DTAIWM.js} +6 -4
  9. package/dist/{chunk-J3ASFPCX.cjs → chunk-IADVBKEJ.cjs} +15 -8
  10. package/dist/chunk-MAXEHYVB.cjs +2362 -0
  11. package/dist/{chunk-I55J3KXD.js → chunk-NH4L6NIY.js} +48 -33
  12. package/dist/{chunk-EQAYMCXO.cjs → chunk-PU2KV7VP.cjs} +48 -33
  13. package/dist/{chunk-APTV6F72.js → chunk-Q7NSUXXB.js} +70 -52
  14. package/dist/{chunk-HEO2JG6C.js → chunk-TMXRYOBS.js} +100 -92
  15. package/dist/{chunk-MH7537FB.cjs → chunk-TVSFDQYE.cjs} +70 -52
  16. package/dist/{chunk-IEJULBKB.cjs → chunk-UA5XFP4O.cjs} +100 -92
  17. package/dist/{chunk-KTVN4P6J.cjs → chunk-UZO5Z2XT.cjs} +62 -51
  18. package/dist/chunk-WX5PU7HF.js +868 -0
  19. package/dist/{chunk-JJEN2VG5.js → chunk-XQGEOFGE.js} +2 -6
  20. package/dist/chunk-YJGOD3Y4.js +2362 -0
  21. package/dist/{codec-BLYAy2OP.d.ts → codec--CVeqGQv.d.ts} +1 -1
  22. package/dist/{codec-DujHf55Z.d.ts → codec-BJ7BHuiZ.d.ts} +1 -1
  23. package/dist/{codec-D47r_-Rl.d.ts → codec-BKsVu3Fr.d.ts} +1 -1
  24. package/dist/{codec-BNS3gS77.d.ts → codec-BMwgZIgG.d.ts} +1 -1
  25. package/dist/{codec-CI0BjmHc.d.ts → codec-BNy5syCU.d.ts} +1 -1
  26. package/dist/{codec-CFhUGTu2.d.ts → codec-BQa6Qsav.d.ts} +2 -2
  27. package/dist/codec-Bym-K2q2.d.cts +49 -0
  28. package/dist/{codec-D2JbI2tp.d.ts → codec-C006F75E.d.ts} +1 -1
  29. package/dist/codec-C5evFHL-.d.ts +49 -0
  30. package/dist/{codec-DQWQSam3.d.cts → codec-C6Mx4bwz.d.cts} +1 -1
  31. package/dist/{codec-DL0njGkL.d.ts → codec-CA6nbbEk.d.ts} +1 -1
  32. package/dist/{codec-D89DWXbv.d.cts → codec-CSBFdPgP.d.cts} +1 -1
  33. package/dist/{codec-DvcJgYKq.d.cts → codec-CXCjya_G.d.cts} +1 -1
  34. package/dist/{codec-hvkJfCF5.d.cts → codec-C_xxsbKy.d.cts} +1 -1
  35. package/dist/{codec-BOyrk_C9.d.cts → codec-Cfo_z5ET.d.cts} +1 -1
  36. package/dist/{codec-xeuGZY77.d.cts → codec-CgZdadPt.d.cts} +2 -2
  37. package/dist/{codec-WwwUipaU.d.ts → codec-Cl73EfRW.d.ts} +1 -1
  38. package/dist/{codec-BOtv3R5j.d.cts → codec-CtvFK4aV.d.cts} +1 -1
  39. package/dist/{codec-DAePx2NL.d.ts → codec-CviAa4lp.d.ts} +2 -2
  40. package/dist/{codec-DJmV04i0.d.ts → codec-D4RvFQmu.d.ts} +1 -1
  41. package/dist/{codec-cou9XBMF.d.cts → codec-DAyiF5sq.d.cts} +1 -1
  42. package/dist/{codec-CyApDKwf.d.cts → codec-DJmqoIsp.d.cts} +1 -1
  43. package/dist/{codec-NMsTK0GX.d.cts → codec-DchsPfr3.d.cts} +1 -1
  44. package/dist/{codec-DplRgIKq.d.ts → codec-Dl_QIXMz.d.ts} +1 -1
  45. package/dist/{codec-BnamSx7L.d.cts → codec-DzLvG8Wb.d.cts} +2 -2
  46. package/dist/{codec-D95gT98n.d.cts → codec-DzkdW4kO.d.cts} +1 -1
  47. package/dist/{codec-CWj5iTxA.d.ts → codec-O-1Js7h4.d.ts} +1 -1
  48. package/dist/{codec-BqqoYdh_.d.cts → codec-vddqy0KY.d.cts} +1 -1
  49. package/dist/draft07-session.d.cts +3 -3
  50. package/dist/draft07-session.d.ts +3 -3
  51. package/dist/draft07.d.cts +3 -3
  52. package/dist/draft07.d.ts +3 -3
  53. package/dist/draft08-session.d.cts +3 -3
  54. package/dist/draft08-session.d.ts +3 -3
  55. package/dist/draft08.d.cts +4 -4
  56. package/dist/draft08.d.ts +4 -4
  57. package/dist/draft09-session.d.cts +3 -3
  58. package/dist/draft09-session.d.ts +3 -3
  59. package/dist/draft09.d.cts +4 -4
  60. package/dist/draft09.d.ts +4 -4
  61. package/dist/draft10-session.d.cts +3 -3
  62. package/dist/draft10-session.d.ts +3 -3
  63. package/dist/draft10.d.cts +4 -4
  64. package/dist/draft10.d.ts +4 -4
  65. package/dist/draft11-session.d.cts +3 -3
  66. package/dist/draft11-session.d.ts +3 -3
  67. package/dist/draft11.d.cts +4 -4
  68. package/dist/draft11.d.ts +4 -4
  69. package/dist/draft12-session.d.cts +3 -3
  70. package/dist/draft12-session.d.ts +3 -3
  71. package/dist/draft12.cjs +2 -2
  72. package/dist/draft12.d.cts +4 -4
  73. package/dist/draft12.d.ts +4 -4
  74. package/dist/draft12.js +1 -1
  75. package/dist/draft13-session.d.cts +3 -3
  76. package/dist/draft13-session.d.ts +3 -3
  77. package/dist/draft13.d.cts +4 -4
  78. package/dist/draft13.d.ts +4 -4
  79. package/dist/draft14-session.d.cts +4 -4
  80. package/dist/draft14-session.d.ts +4 -4
  81. package/dist/draft14.cjs +2 -2
  82. package/dist/draft14.d.cts +6 -6
  83. package/dist/draft14.d.ts +6 -6
  84. package/dist/draft14.js +1 -1
  85. package/dist/draft15-session.d.cts +3 -3
  86. package/dist/draft15-session.d.ts +3 -3
  87. package/dist/draft15.cjs +2 -2
  88. package/dist/draft15.d.cts +4 -4
  89. package/dist/draft15.d.ts +4 -4
  90. package/dist/draft15.js +1 -1
  91. package/dist/draft16-session.d.cts +3 -3
  92. package/dist/draft16-session.d.ts +3 -3
  93. package/dist/draft16.cjs +2 -2
  94. package/dist/draft16.d.cts +4 -4
  95. package/dist/draft16.d.ts +4 -4
  96. package/dist/draft16.js +1 -1
  97. package/dist/draft17-session.d.cts +3 -3
  98. package/dist/draft17-session.d.ts +3 -3
  99. package/dist/draft17.cjs +2 -2
  100. package/dist/draft17.d.cts +3 -3
  101. package/dist/draft17.d.ts +3 -3
  102. package/dist/draft17.js +1 -1
  103. package/dist/draft18-session.d.cts +3 -3
  104. package/dist/draft18-session.d.ts +3 -3
  105. package/dist/draft18.cjs +2 -2
  106. package/dist/draft18.d.cts +3 -3
  107. package/dist/draft18.d.ts +3 -3
  108. package/dist/draft18.js +1 -1
  109. package/dist/draft19-session.d.cts +3 -3
  110. package/dist/draft19-session.d.ts +3 -3
  111. package/dist/draft19.cjs +2 -2
  112. package/dist/draft19.d.cts +3 -3
  113. package/dist/draft19.d.ts +3 -3
  114. package/dist/draft19.js +1 -1
  115. package/dist/draft20-session.cjs +8 -0
  116. package/dist/draft20-session.d.cts +195 -0
  117. package/dist/draft20-session.d.ts +195 -0
  118. package/dist/draft20-session.js +8 -0
  119. package/dist/draft20.cjs +217 -0
  120. package/dist/draft20.d.cts +175 -0
  121. package/dist/draft20.d.ts +175 -0
  122. package/dist/draft20.js +217 -0
  123. package/dist/index.cjs +21 -15
  124. package/dist/index.d.cts +33 -18
  125. package/dist/index.d.ts +33 -18
  126. package/dist/index.js +14 -8
  127. package/dist/{session-types-KsqyVp6y.d.cts → session-types-B9idsih-.d.cts} +13 -1
  128. package/dist/{session-types-C0l_-Ups.d.ts → session-types-Dn7b3RZM.d.ts} +13 -1
  129. package/dist/session.cjs +5 -1
  130. package/dist/session.d.cts +6 -4
  131. package/dist/session.d.ts +6 -4
  132. package/dist/session.js +5 -1
  133. package/dist/types-CWCQwuvy.d.cts +359 -0
  134. package/dist/types-CWCQwuvy.d.ts +359 -0
  135. package/dist/{types-CdCSIfvI.d.cts → types-DG5_iKuv.d.cts} +1 -1
  136. package/dist/{types-CdCSIfvI.d.ts → types-DG5_iKuv.d.ts} +1 -1
  137. package/dist/{types-CVeKIk7A.d.cts → types-HI_bbXka.d.cts} +0 -2
  138. package/dist/{types-CVeKIk7A.d.ts → types-HI_bbXka.d.ts} +0 -2
  139. package/package.json +16 -3
  140. package/src/core/session-types.ts +7 -0
  141. package/src/core/types.ts +1 -0
  142. package/src/drafts/draft12/data-streams.ts +13 -4
  143. package/src/drafts/draft14/codec.ts +2 -6
  144. package/src/drafts/draft14/types.ts +0 -2
  145. package/src/drafts/draft15/data-streams.ts +30 -16
  146. package/src/drafts/draft16/codec.ts +116 -93
  147. package/src/drafts/draft17/codec.ts +72 -35
  148. package/src/drafts/draft18/codec.ts +89 -53
  149. package/src/drafts/draft19/codec.ts +98 -55
  150. package/src/drafts/draft20/codec.ts +1737 -0
  151. package/src/drafts/draft20/data-streams.ts +1291 -0
  152. package/src/drafts/draft20/error-codes.ts +135 -0
  153. package/src/drafts/draft20/index.ts +165 -0
  154. package/src/drafts/draft20/messages.ts +68 -0
  155. package/src/drafts/draft20/rules.ts +107 -0
  156. package/src/drafts/draft20/session-fsm.ts +1063 -0
  157. package/src/drafts/draft20/session.ts +21 -0
  158. package/src/drafts/draft20/types.ts +455 -0
  159. package/src/index.ts +20 -2
  160. package/src/session.ts +4 -0
@@ -108,11 +108,14 @@ function encodeDatagram(dg) {
108
108
  w.writeVarInt(dg.groupId);
109
109
  const extensionsPresent = (dgType & 1) !== 0;
110
110
  const objectIdAbsent = (dgType & 4) !== 0;
111
+ const defaultPriority = (dgType & 8) !== 0;
111
112
  const isStatus = (dgType & 32) !== 0;
112
113
  if (!objectIdAbsent) {
113
114
  w.writeVarInt(dg.objectId);
114
115
  }
115
- w.writeUint8(dg.publisherPriority);
116
+ if (!defaultPriority) {
117
+ w.writeUint8(dg.publisherPriority);
118
+ }
116
119
  if (extensionsPresent) {
117
120
  const extData = dg.extensionData ?? new Uint8Array(0);
118
121
  w.writeVarInt(BigInt(extData.length));
@@ -154,18 +157,18 @@ function decodeSubgroupStream(bytes) {
154
157
  try {
155
158
  const r = new BufferReader(bytes);
156
159
  const streamType = Number(r.readVarInt());
157
- if (!(streamType >= 16 && streamType <= 23 || streamType >= 48 && streamType <= 55)) {
160
+ if (!(streamType >= 16 && streamType <= 31 || streamType >= 48 && streamType <= 63) || (streamType & 6) === 6) {
158
161
  return {
159
162
  ok: false,
160
163
  error: new DecodeError(
161
164
  "CONSTRAINT_VIOLATION",
162
- `Expected subgroup stream type 0x10-0x17/0x30-0x37, got 0x${streamType.toString(16)}`,
165
+ `Expected subgroup stream type 0x10-0x1F/0x30-0x3F, got 0x${streamType.toString(16)}`,
163
166
  0
164
167
  )
165
168
  };
166
169
  }
167
170
  const extensionsPresent = (streamType & 1) !== 0;
168
- const endOfGroup = (streamType & 2) !== 0;
171
+ const endOfGroup = (streamType & 8) !== 0;
169
172
  const hasSubgroupField = (streamType & 4) !== 0;
170
173
  const hasPriority = streamType < 48;
171
174
  const trackAlias = r.readVarInt();
@@ -248,6 +251,7 @@ function decodeDatagram(bytes) {
248
251
  const extensionsPresent = (dgType & 1) !== 0;
249
252
  const objectIdAbsent = (dgType & 4) !== 0;
250
253
  const endOfGroup = (dgType & 2) !== 0;
254
+ const defaultPriority = (dgType & 8) !== 0;
251
255
  const isStatus = (dgType & 32) !== 0;
252
256
  const trackAlias = r.readVarInt();
253
257
  const groupId = r.readVarInt();
@@ -255,7 +259,10 @@ function decodeDatagram(bytes) {
255
259
  if (!objectIdAbsent) {
256
260
  objectId = r.readVarInt();
257
261
  }
258
- const publisherPriority = r.readUint8();
262
+ let publisherPriority = 128;
263
+ if (!defaultPriority) {
264
+ publisherPriority = r.readUint8();
265
+ }
259
266
  let extensionData;
260
267
  if (extensionsPresent) {
261
268
  const extLen = Number(r.readVarInt());
@@ -472,7 +479,7 @@ function createSubgroupStreamDecoder() {
472
479
  try {
473
480
  const r = new BufferReader(buffer.subarray(offset));
474
481
  const streamType = Number(r.readVarInt());
475
- if (!(streamType >= 16 && streamType <= 23 || streamType >= 48 && streamType <= 55)) {
482
+ if (!(streamType >= 16 && streamType <= 31 || streamType >= 48 && streamType <= 63)) {
476
483
  controller.error(
477
484
  new DecodeError(
478
485
  "CONSTRAINT_VIOLATION",
@@ -667,7 +674,7 @@ function createDataStreamDecoder() {
667
674
  if (inner === null) {
668
675
  if (offset >= buffer.length) return;
669
676
  const firstByte = buffer[offset];
670
- if (firstByte >= 16 && firstByte <= 23 || firstByte >= 48 && firstByte <= 55) {
677
+ if (firstByte >= 16 && firstByte <= 31 || firstByte >= 48 && firstByte <= 63) {
671
678
  const decoder = createSubgroupStreamDecoder();
672
679
  inner = decoder;
673
680
  } else if (firstByte === 5) {
@@ -690,7 +697,7 @@ function createDataStreamDecoder() {
690
697
  const view = buffer.subarray(offset);
691
698
  const firstByte = view[0];
692
699
  let result;
693
- if (firstByte >= 16 && firstByte <= 23 || firstByte >= 48 && firstByte <= 55) {
700
+ if (firstByte >= 16 && firstByte <= 31 || firstByte >= 48 && firstByte <= 63) {
694
701
  result = decodeSubgroupStream(view);
695
702
  } else if (firstByte === 5) {
696
703
  result = decodeFetchStream(view);
@@ -46,7 +46,7 @@ function encodeDatagram(dg) {
46
46
  w.writeVarInt(extData.byteLength);
47
47
  if (extData.byteLength > 0) w.writeBytes(extData);
48
48
  }
49
- const isStatus = dg.streamTypeId === 2 || dg.streamTypeId === 3;
49
+ const isStatus = dg.streamTypeId >= 4;
50
50
  if (isStatus) {
51
51
  w.writeVarInt(_nullishCoalesce(dg.objectStatus, () => ( 0n)));
52
52
  } else {
@@ -162,18 +162,19 @@ function decodeDatagram(bytes) {
162
162
  try {
163
163
  const r = new (0, _chunk4XLYCT5Qcjs.BufferReader)(bytes);
164
164
  const streamTypeId = Number(r.readVarInt());
165
- if (streamTypeId < 0 || streamTypeId > 3) {
165
+ if (streamTypeId < 0 || streamTypeId > 5) {
166
166
  return {
167
167
  ok: false,
168
168
  error: new (0, _chunk4XLYCT5Qcjs.DecodeError)(
169
169
  "CONSTRAINT_VIOLATION",
170
- `Expected datagram type 0x00-0x03, got 0x${streamTypeId.toString(16)}`,
170
+ `Expected datagram type 0x00-0x05, got 0x${streamTypeId.toString(16)}`,
171
171
  0
172
172
  )
173
173
  };
174
174
  }
175
175
  const extensionsPresent = (streamTypeId & 1) !== 0;
176
- const isStatus = streamTypeId === 2 || streamTypeId === 3;
176
+ const endOfGroup = (streamTypeId & 2) !== 0 && streamTypeId < 4;
177
+ const isStatus = streamTypeId >= 4;
177
178
  const trackAlias = r.readVarInt();
178
179
  const groupId = r.readVarInt();
179
180
  const objectId = r.readVarInt();
@@ -202,6 +203,7 @@ function decodeDatagram(bytes) {
202
203
  payloadLength: payload.byteLength,
203
204
  payload
204
205
  };
206
+ if (endOfGroup) result.endOfGroup = true;
205
207
  if (extensionHeadersLength !== void 0)
206
208
  result.extensionHeadersLength = extensionHeadersLength;
207
209
  if (extensionData !== void 0)
@@ -46,7 +46,7 @@ function encodeDatagram(dg) {
46
46
  w.writeVarInt(extData.byteLength);
47
47
  if (extData.byteLength > 0) w.writeBytes(extData);
48
48
  }
49
- const isStatus = dg.streamTypeId === 2 || dg.streamTypeId === 3;
49
+ const isStatus = dg.streamTypeId >= 4;
50
50
  if (isStatus) {
51
51
  w.writeVarInt(dg.objectStatus ?? 0n);
52
52
  } else {
@@ -162,18 +162,19 @@ function decodeDatagram(bytes) {
162
162
  try {
163
163
  const r = new BufferReader(bytes);
164
164
  const streamTypeId = Number(r.readVarInt());
165
- if (streamTypeId < 0 || streamTypeId > 3) {
165
+ if (streamTypeId < 0 || streamTypeId > 5) {
166
166
  return {
167
167
  ok: false,
168
168
  error: new DecodeError(
169
169
  "CONSTRAINT_VIOLATION",
170
- `Expected datagram type 0x00-0x03, got 0x${streamTypeId.toString(16)}`,
170
+ `Expected datagram type 0x00-0x05, got 0x${streamTypeId.toString(16)}`,
171
171
  0
172
172
  )
173
173
  };
174
174
  }
175
175
  const extensionsPresent = (streamTypeId & 1) !== 0;
176
- const isStatus = streamTypeId === 2 || streamTypeId === 3;
176
+ const endOfGroup = (streamTypeId & 2) !== 0 && streamTypeId < 4;
177
+ const isStatus = streamTypeId >= 4;
177
178
  const trackAlias = r.readVarInt();
178
179
  const groupId = r.readVarInt();
179
180
  const objectId = r.readVarInt();
@@ -202,6 +203,7 @@ function decodeDatagram(bytes) {
202
203
  payloadLength: payload.byteLength,
203
204
  payload
204
205
  };
206
+ if (endOfGroup) result.endOfGroup = true;
205
207
  if (extensionHeadersLength !== void 0)
206
208
  result.extensionHeadersLength = extensionHeadersLength;
207
209
  if (extensionData !== void 0)
@@ -108,11 +108,14 @@ function encodeDatagram(dg) {
108
108
  w.writeVarInt(dg.groupId);
109
109
  const extensionsPresent = (dgType & 1) !== 0;
110
110
  const objectIdAbsent = (dgType & 4) !== 0;
111
+ const defaultPriority = (dgType & 8) !== 0;
111
112
  const isStatus = (dgType & 32) !== 0;
112
113
  if (!objectIdAbsent) {
113
114
  w.writeVarInt(dg.objectId);
114
115
  }
115
- w.writeUint8(dg.publisherPriority);
116
+ if (!defaultPriority) {
117
+ w.writeUint8(dg.publisherPriority);
118
+ }
116
119
  if (extensionsPresent) {
117
120
  const extData = _nullishCoalesce(dg.extensionData, () => ( new Uint8Array(0)));
118
121
  w.writeVarInt(BigInt(extData.length));
@@ -154,18 +157,18 @@ function decodeSubgroupStream(bytes) {
154
157
  try {
155
158
  const r = new (0, _chunk4XLYCT5Qcjs.BufferReader)(bytes);
156
159
  const streamType = Number(r.readVarInt());
157
- if (!(streamType >= 16 && streamType <= 23 || streamType >= 48 && streamType <= 55)) {
160
+ if (!(streamType >= 16 && streamType <= 31 || streamType >= 48 && streamType <= 63) || (streamType & 6) === 6) {
158
161
  return {
159
162
  ok: false,
160
163
  error: new (0, _chunk4XLYCT5Qcjs.DecodeError)(
161
164
  "CONSTRAINT_VIOLATION",
162
- `Expected subgroup stream type 0x10-0x17/0x30-0x37, got 0x${streamType.toString(16)}`,
165
+ `Expected subgroup stream type 0x10-0x1F/0x30-0x3F, got 0x${streamType.toString(16)}`,
163
166
  0
164
167
  )
165
168
  };
166
169
  }
167
170
  const extensionsPresent = (streamType & 1) !== 0;
168
- const endOfGroup = (streamType & 2) !== 0;
171
+ const endOfGroup = (streamType & 8) !== 0;
169
172
  const hasSubgroupField = (streamType & 4) !== 0;
170
173
  const hasPriority = streamType < 48;
171
174
  const trackAlias = r.readVarInt();
@@ -248,6 +251,7 @@ function decodeDatagram(bytes) {
248
251
  const extensionsPresent = (dgType & 1) !== 0;
249
252
  const objectIdAbsent = (dgType & 4) !== 0;
250
253
  const endOfGroup = (dgType & 2) !== 0;
254
+ const defaultPriority = (dgType & 8) !== 0;
251
255
  const isStatus = (dgType & 32) !== 0;
252
256
  const trackAlias = r.readVarInt();
253
257
  const groupId = r.readVarInt();
@@ -255,7 +259,10 @@ function decodeDatagram(bytes) {
255
259
  if (!objectIdAbsent) {
256
260
  objectId = r.readVarInt();
257
261
  }
258
- const publisherPriority = r.readUint8();
262
+ let publisherPriority = 128;
263
+ if (!defaultPriority) {
264
+ publisherPriority = r.readUint8();
265
+ }
259
266
  let extensionData;
260
267
  if (extensionsPresent) {
261
268
  const extLen = Number(r.readVarInt());
@@ -472,7 +479,7 @@ function createSubgroupStreamDecoder() {
472
479
  try {
473
480
  const r = new (0, _chunk4XLYCT5Qcjs.BufferReader)(buffer.subarray(offset));
474
481
  const streamType = Number(r.readVarInt());
475
- if (!(streamType >= 16 && streamType <= 23 || streamType >= 48 && streamType <= 55)) {
482
+ if (!(streamType >= 16 && streamType <= 31 || streamType >= 48 && streamType <= 63)) {
476
483
  controller.error(
477
484
  new (0, _chunk4XLYCT5Qcjs.DecodeError)(
478
485
  "CONSTRAINT_VIOLATION",
@@ -667,7 +674,7 @@ function createDataStreamDecoder() {
667
674
  if (inner === null) {
668
675
  if (offset >= buffer.length) return;
669
676
  const firstByte = buffer[offset];
670
- if (firstByte >= 16 && firstByte <= 23 || firstByte >= 48 && firstByte <= 55) {
677
+ if (firstByte >= 16 && firstByte <= 31 || firstByte >= 48 && firstByte <= 63) {
671
678
  const decoder = createSubgroupStreamDecoder();
672
679
  inner = decoder;
673
680
  } else if (firstByte === 5) {
@@ -690,7 +697,7 @@ function createDataStreamDecoder() {
690
697
  const view = buffer.subarray(offset);
691
698
  const firstByte = view[0];
692
699
  let result;
693
- if (firstByte >= 16 && firstByte <= 23 || firstByte >= 48 && firstByte <= 55) {
700
+ if (firstByte >= 16 && firstByte <= 31 || firstByte >= 48 && firstByte <= 63) {
694
701
  result = decodeSubgroupStream(view);
695
702
  } else if (firstByte === 5) {
696
703
  result = decodeFetchStream(view);