@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.
- package/CHANGELOG.md +49 -0
- package/README.md +16 -4
- package/dist/{chunk-5XZKO2U5.js → chunk-2XH6PHXR.js} +62 -51
- package/dist/{chunk-BQHLUT37.cjs → chunk-7ENEWAMZ.cjs} +2 -6
- package/dist/chunk-BMJMY6FX.cjs +868 -0
- package/dist/{chunk-MD2OA7SE.js → chunk-BV6MITLO.js} +15 -8
- package/dist/{chunk-B56AG5HU.cjs → chunk-EVCPBFSR.cjs} +6 -4
- package/dist/{chunk-KNLPX3YA.js → chunk-H6DTAIWM.js} +6 -4
- package/dist/{chunk-J3ASFPCX.cjs → chunk-IADVBKEJ.cjs} +15 -8
- package/dist/chunk-MAXEHYVB.cjs +2362 -0
- package/dist/{chunk-I55J3KXD.js → chunk-NH4L6NIY.js} +48 -33
- package/dist/{chunk-EQAYMCXO.cjs → chunk-PU2KV7VP.cjs} +48 -33
- package/dist/{chunk-APTV6F72.js → chunk-Q7NSUXXB.js} +70 -52
- package/dist/{chunk-HEO2JG6C.js → chunk-TMXRYOBS.js} +100 -92
- package/dist/{chunk-MH7537FB.cjs → chunk-TVSFDQYE.cjs} +70 -52
- package/dist/{chunk-IEJULBKB.cjs → chunk-UA5XFP4O.cjs} +100 -92
- package/dist/{chunk-KTVN4P6J.cjs → chunk-UZO5Z2XT.cjs} +62 -51
- package/dist/chunk-WX5PU7HF.js +868 -0
- package/dist/{chunk-JJEN2VG5.js → chunk-XQGEOFGE.js} +2 -6
- package/dist/chunk-YJGOD3Y4.js +2362 -0
- package/dist/{codec-BLYAy2OP.d.ts → codec--CVeqGQv.d.ts} +1 -1
- package/dist/{codec-DujHf55Z.d.ts → codec-BJ7BHuiZ.d.ts} +1 -1
- package/dist/{codec-D47r_-Rl.d.ts → codec-BKsVu3Fr.d.ts} +1 -1
- package/dist/{codec-BNS3gS77.d.ts → codec-BMwgZIgG.d.ts} +1 -1
- package/dist/{codec-CI0BjmHc.d.ts → codec-BNy5syCU.d.ts} +1 -1
- package/dist/{codec-CFhUGTu2.d.ts → codec-BQa6Qsav.d.ts} +2 -2
- package/dist/codec-Bym-K2q2.d.cts +49 -0
- package/dist/{codec-D2JbI2tp.d.ts → codec-C006F75E.d.ts} +1 -1
- package/dist/codec-C5evFHL-.d.ts +49 -0
- package/dist/{codec-DQWQSam3.d.cts → codec-C6Mx4bwz.d.cts} +1 -1
- package/dist/{codec-DL0njGkL.d.ts → codec-CA6nbbEk.d.ts} +1 -1
- package/dist/{codec-D89DWXbv.d.cts → codec-CSBFdPgP.d.cts} +1 -1
- package/dist/{codec-DvcJgYKq.d.cts → codec-CXCjya_G.d.cts} +1 -1
- package/dist/{codec-hvkJfCF5.d.cts → codec-C_xxsbKy.d.cts} +1 -1
- package/dist/{codec-BOyrk_C9.d.cts → codec-Cfo_z5ET.d.cts} +1 -1
- package/dist/{codec-xeuGZY77.d.cts → codec-CgZdadPt.d.cts} +2 -2
- package/dist/{codec-WwwUipaU.d.ts → codec-Cl73EfRW.d.ts} +1 -1
- package/dist/{codec-BOtv3R5j.d.cts → codec-CtvFK4aV.d.cts} +1 -1
- package/dist/{codec-DAePx2NL.d.ts → codec-CviAa4lp.d.ts} +2 -2
- package/dist/{codec-DJmV04i0.d.ts → codec-D4RvFQmu.d.ts} +1 -1
- package/dist/{codec-cou9XBMF.d.cts → codec-DAyiF5sq.d.cts} +1 -1
- package/dist/{codec-CyApDKwf.d.cts → codec-DJmqoIsp.d.cts} +1 -1
- package/dist/{codec-NMsTK0GX.d.cts → codec-DchsPfr3.d.cts} +1 -1
- package/dist/{codec-DplRgIKq.d.ts → codec-Dl_QIXMz.d.ts} +1 -1
- package/dist/{codec-BnamSx7L.d.cts → codec-DzLvG8Wb.d.cts} +2 -2
- package/dist/{codec-D95gT98n.d.cts → codec-DzkdW4kO.d.cts} +1 -1
- package/dist/{codec-CWj5iTxA.d.ts → codec-O-1Js7h4.d.ts} +1 -1
- package/dist/{codec-BqqoYdh_.d.cts → codec-vddqy0KY.d.cts} +1 -1
- package/dist/draft07-session.d.cts +3 -3
- package/dist/draft07-session.d.ts +3 -3
- package/dist/draft07.d.cts +3 -3
- package/dist/draft07.d.ts +3 -3
- package/dist/draft08-session.d.cts +3 -3
- package/dist/draft08-session.d.ts +3 -3
- package/dist/draft08.d.cts +4 -4
- package/dist/draft08.d.ts +4 -4
- package/dist/draft09-session.d.cts +3 -3
- package/dist/draft09-session.d.ts +3 -3
- package/dist/draft09.d.cts +4 -4
- package/dist/draft09.d.ts +4 -4
- package/dist/draft10-session.d.cts +3 -3
- package/dist/draft10-session.d.ts +3 -3
- package/dist/draft10.d.cts +4 -4
- package/dist/draft10.d.ts +4 -4
- package/dist/draft11-session.d.cts +3 -3
- package/dist/draft11-session.d.ts +3 -3
- package/dist/draft11.d.cts +4 -4
- package/dist/draft11.d.ts +4 -4
- package/dist/draft12-session.d.cts +3 -3
- package/dist/draft12-session.d.ts +3 -3
- package/dist/draft12.cjs +2 -2
- package/dist/draft12.d.cts +4 -4
- package/dist/draft12.d.ts +4 -4
- package/dist/draft12.js +1 -1
- package/dist/draft13-session.d.cts +3 -3
- package/dist/draft13-session.d.ts +3 -3
- package/dist/draft13.d.cts +4 -4
- package/dist/draft13.d.ts +4 -4
- package/dist/draft14-session.d.cts +4 -4
- package/dist/draft14-session.d.ts +4 -4
- package/dist/draft14.cjs +2 -2
- package/dist/draft14.d.cts +6 -6
- package/dist/draft14.d.ts +6 -6
- package/dist/draft14.js +1 -1
- package/dist/draft15-session.d.cts +3 -3
- package/dist/draft15-session.d.ts +3 -3
- package/dist/draft15.cjs +2 -2
- package/dist/draft15.d.cts +4 -4
- package/dist/draft15.d.ts +4 -4
- package/dist/draft15.js +1 -1
- package/dist/draft16-session.d.cts +3 -3
- package/dist/draft16-session.d.ts +3 -3
- package/dist/draft16.cjs +2 -2
- package/dist/draft16.d.cts +4 -4
- package/dist/draft16.d.ts +4 -4
- package/dist/draft16.js +1 -1
- package/dist/draft17-session.d.cts +3 -3
- package/dist/draft17-session.d.ts +3 -3
- package/dist/draft17.cjs +2 -2
- package/dist/draft17.d.cts +3 -3
- package/dist/draft17.d.ts +3 -3
- package/dist/draft17.js +1 -1
- package/dist/draft18-session.d.cts +3 -3
- package/dist/draft18-session.d.ts +3 -3
- package/dist/draft18.cjs +2 -2
- package/dist/draft18.d.cts +3 -3
- package/dist/draft18.d.ts +3 -3
- package/dist/draft18.js +1 -1
- package/dist/draft19-session.d.cts +3 -3
- package/dist/draft19-session.d.ts +3 -3
- package/dist/draft19.cjs +2 -2
- package/dist/draft19.d.cts +3 -3
- package/dist/draft19.d.ts +3 -3
- package/dist/draft19.js +1 -1
- package/dist/draft20-session.cjs +8 -0
- package/dist/draft20-session.d.cts +195 -0
- package/dist/draft20-session.d.ts +195 -0
- package/dist/draft20-session.js +8 -0
- package/dist/draft20.cjs +217 -0
- package/dist/draft20.d.cts +175 -0
- package/dist/draft20.d.ts +175 -0
- package/dist/draft20.js +217 -0
- package/dist/index.cjs +21 -15
- package/dist/index.d.cts +33 -18
- package/dist/index.d.ts +33 -18
- package/dist/index.js +14 -8
- package/dist/{session-types-KsqyVp6y.d.cts → session-types-B9idsih-.d.cts} +13 -1
- package/dist/{session-types-C0l_-Ups.d.ts → session-types-Dn7b3RZM.d.ts} +13 -1
- package/dist/session.cjs +5 -1
- package/dist/session.d.cts +6 -4
- package/dist/session.d.ts +6 -4
- package/dist/session.js +5 -1
- package/dist/types-CWCQwuvy.d.cts +359 -0
- package/dist/types-CWCQwuvy.d.ts +359 -0
- package/dist/{types-CdCSIfvI.d.cts → types-DG5_iKuv.d.cts} +1 -1
- package/dist/{types-CdCSIfvI.d.ts → types-DG5_iKuv.d.ts} +1 -1
- package/dist/{types-CVeKIk7A.d.cts → types-HI_bbXka.d.cts} +0 -2
- package/dist/{types-CVeKIk7A.d.ts → types-HI_bbXka.d.ts} +0 -2
- package/package.json +16 -3
- package/src/core/session-types.ts +7 -0
- package/src/core/types.ts +1 -0
- package/src/drafts/draft12/data-streams.ts +13 -4
- package/src/drafts/draft14/codec.ts +2 -6
- package/src/drafts/draft14/types.ts +0 -2
- package/src/drafts/draft15/data-streams.ts +30 -16
- package/src/drafts/draft16/codec.ts +116 -93
- package/src/drafts/draft17/codec.ts +72 -35
- package/src/drafts/draft18/codec.ts +89 -53
- package/src/drafts/draft19/codec.ts +98 -55
- package/src/drafts/draft20/codec.ts +1737 -0
- package/src/drafts/draft20/data-streams.ts +1291 -0
- package/src/drafts/draft20/error-codes.ts +135 -0
- package/src/drafts/draft20/index.ts +165 -0
- package/src/drafts/draft20/messages.ts +68 -0
- package/src/drafts/draft20/rules.ts +107 -0
- package/src/drafts/draft20/session-fsm.ts +1063 -0
- package/src/drafts/draft20/session.ts +21 -0
- package/src/drafts/draft20/types.ts +455 -0
- package/src/index.ts +20 -2
- 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
|
-
|
|
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 <=
|
|
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-
|
|
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 &
|
|
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
|
-
|
|
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 <=
|
|
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 <=
|
|
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 <=
|
|
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
|
|
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 >
|
|
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-
|
|
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
|
|
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
|
|
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 >
|
|
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-
|
|
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
|
|
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
|
-
|
|
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 <=
|
|
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-
|
|
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 &
|
|
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
|
-
|
|
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 <=
|
|
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 <=
|
|
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 <=
|
|
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);
|