@cloudbitmaps/core 0.6.0 → 0.7.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/dist/index.cjs +11 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -4
- package/dist/index.d.ts +14 -4
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1504,8 +1504,8 @@ var FOOTER = {
|
|
|
1504
1504
|
// u32
|
|
1505
1505
|
flags: 20,
|
|
1506
1506
|
// u32
|
|
1507
|
-
|
|
1508
|
-
// u16
|
|
1507
|
+
payloadCodecId: 24,
|
|
1508
|
+
// u16 — was `roaringSerializationId`; same offset, same width, wider meaning
|
|
1509
1509
|
elementWidth: 26,
|
|
1510
1510
|
// u8
|
|
1511
1511
|
containerCodec: 27,
|
|
@@ -1533,7 +1533,10 @@ var FOOTER_CRC_COVERAGE = FOOTER.footerCrc32c;
|
|
|
1533
1533
|
var FLAG_ENCRYPTED = 1 << 0;
|
|
1534
1534
|
var FLAG_LITTLE_ENDIAN = 1 << 2;
|
|
1535
1535
|
var ELEMENT_WIDTH_32 = 32;
|
|
1536
|
-
var
|
|
1536
|
+
var PAYLOAD_CODEC_ROARING_PORTABLE = 1;
|
|
1537
|
+
var KNOWN_PAYLOAD_CODEC_IDS = /* @__PURE__ */ new Set([
|
|
1538
|
+
PAYLOAD_CODEC_ROARING_PORTABLE
|
|
1539
|
+
]);
|
|
1537
1540
|
var CONTAINER_CODEC_NONE = 0;
|
|
1538
1541
|
var DEFAULT_TAIL_BYTES = 256 * 1024;
|
|
1539
1542
|
var DEFAULT_MAX_INDEX_BYTES = 8 * 1024 * 1024;
|
|
@@ -1630,10 +1633,10 @@ var CrbmReader = class _CrbmReader {
|
|
|
1630
1633
|
`.crbm element_width ${elementWidth} not supported (v1 reads 32-bit ids; 64-bit is a future major version)`
|
|
1631
1634
|
);
|
|
1632
1635
|
}
|
|
1633
|
-
const
|
|
1634
|
-
if (
|
|
1636
|
+
const payloadCodecId = fview.getUint16(FOOTER.payloadCodecId, true);
|
|
1637
|
+
if (!KNOWN_PAYLOAD_CODEC_IDS.has(payloadCodecId)) {
|
|
1635
1638
|
throw new UnsupportedError(
|
|
1636
|
-
`.crbm
|
|
1639
|
+
`.crbm payload_codec_id ${payloadCodecId} not supported by this build (known: ${[...KNOWN_PAYLOAD_CODEC_IDS].join(", ")}; ${PAYLOAD_CODEC_ROARING_PORTABLE}=roaring portable). A generation written by a different codec is rejected rather than decoded \u2014 a store uses one codec throughout.`
|
|
1637
1640
|
);
|
|
1638
1641
|
}
|
|
1639
1642
|
const containerCodec = footer[FOOTER.containerCodec];
|
|
@@ -1928,8 +1931,8 @@ var CrbmWriter = class {
|
|
|
1928
1931
|
view.setUint32(FOOTER.indexCrc32c, crc32c(indexRegion), true);
|
|
1929
1932
|
view.setUint32(FOOTER.flags, FLAG_LITTLE_ENDIAN | (encrypted ? FLAG_ENCRYPTED : 0), true);
|
|
1930
1933
|
view.setUint16(
|
|
1931
|
-
FOOTER.
|
|
1932
|
-
this.options.
|
|
1934
|
+
FOOTER.payloadCodecId,
|
|
1935
|
+
this.options.payloadCodecId ?? PAYLOAD_CODEC_ROARING_PORTABLE,
|
|
1933
1936
|
true
|
|
1934
1937
|
);
|
|
1935
1938
|
footer[FOOTER.elementWidth] = this.options.elementWidth ?? ELEMENT_WIDTH_32;
|