@gmod/cram 1.5.9 → 1.6.2
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 +90 -0
- package/README.md +182 -172
- package/dist/craiIndex.d.ts +37 -0
- package/dist/craiIndex.js +196 -301
- package/dist/craiIndex.js.map +1 -0
- package/dist/cram-bundle.js +6 -15
- package/dist/cramFile/codecs/_base.d.ts +6 -0
- package/dist/cramFile/codecs/_base.js +44 -53
- package/dist/cramFile/codecs/_base.js.map +1 -0
- package/dist/cramFile/codecs/beta.d.ts +4 -0
- package/dist/cramFile/codecs/beta.js +38 -48
- package/dist/cramFile/codecs/beta.js.map +1 -0
- package/dist/cramFile/codecs/byteArrayLength.d.ts +8 -0
- package/dist/cramFile/codecs/byteArrayLength.js +58 -78
- package/dist/cramFile/codecs/byteArrayLength.js.map +1 -0
- package/dist/cramFile/codecs/byteArrayStop.d.ts +6 -0
- package/dist/cramFile/codecs/byteArrayStop.js +62 -76
- package/dist/cramFile/codecs/byteArrayStop.js.map +1 -0
- package/dist/cramFile/codecs/external.d.ts +7 -0
- package/dist/cramFile/codecs/external.js +63 -81
- package/dist/cramFile/codecs/external.js.map +1 -0
- package/dist/cramFile/codecs/gamma.d.ts +4 -0
- package/dist/cramFile/codecs/gamma.js +43 -56
- package/dist/cramFile/codecs/gamma.js.map +1 -0
- package/dist/cramFile/codecs/huffman.d.ts +17 -0
- package/dist/cramFile/codecs/huffman.js +126 -199
- package/dist/cramFile/codecs/huffman.js.map +1 -0
- package/dist/cramFile/codecs/index.d.ts +2 -0
- package/dist/cramFile/codecs/index.js +31 -38
- package/dist/cramFile/codecs/index.js.map +1 -0
- package/dist/cramFile/codecs/subexp.d.ts +4 -0
- package/dist/cramFile/codecs/subexp.js +51 -64
- package/dist/cramFile/codecs/subexp.js.map +1 -0
- package/dist/cramFile/constants.d.ts +36 -0
- package/dist/cramFile/constants.js +52 -50
- package/dist/cramFile/constants.js.map +1 -0
- package/dist/cramFile/container/compressionScheme.d.ts +23 -0
- package/dist/cramFile/container/compressionScheme.js +115 -153
- package/dist/cramFile/container/compressionScheme.js.map +1 -0
- package/dist/cramFile/container/index.d.ts +13 -0
- package/dist/cramFile/container/index.js +169 -283
- package/dist/cramFile/container/index.js.map +1 -0
- package/dist/cramFile/file.d.ts +63 -0
- package/dist/cramFile/file.js +440 -766
- package/dist/cramFile/file.js.map +1 -0
- package/dist/cramFile/index.d.ts +2 -0
- package/dist/cramFile/index.js +7 -4
- package/dist/cramFile/index.js.map +1 -0
- package/dist/cramFile/record.d.ts +79 -0
- package/dist/cramFile/record.js +253 -308
- package/dist/cramFile/record.js.map +1 -0
- package/dist/cramFile/sectionParsers.d.ts +18 -0
- package/dist/cramFile/sectionParsers.js +324 -362
- package/dist/cramFile/sectionParsers.js.map +1 -0
- package/dist/cramFile/slice/decodeRecord.d.ts +2 -0
- package/dist/cramFile/slice/decodeRecord.js +278 -298
- package/dist/cramFile/slice/decodeRecord.js.map +1 -0
- package/dist/cramFile/slice/index.d.ts +20 -0
- package/dist/cramFile/slice/index.js +488 -789
- package/dist/cramFile/slice/index.js.map +1 -0
- package/dist/cramFile/util.d.ts +5 -0
- package/dist/cramFile/util.js +158 -144
- package/dist/cramFile/util.js.map +1 -0
- package/dist/errors.d.ts +23 -0
- package/dist/errors.js +66 -103
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -0
- package/dist/indexedCramFile.d.ts +39 -0
- package/dist/indexedCramFile.js +213 -315
- package/dist/indexedCramFile.js.map +1 -0
- package/dist/io/bufferCache.d.ts +12 -0
- package/dist/io/bufferCache.js +108 -128
- package/dist/io/bufferCache.js.map +1 -0
- package/dist/io/index.d.ts +5 -0
- package/dist/io/index.js +29 -27
- package/dist/io/index.js.map +1 -0
- package/dist/io/localFile.d.ts +10 -0
- package/dist/io/localFile.js +105 -162
- package/dist/io/localFile.js.map +1 -0
- package/dist/io/remoteFile.d.ts +16 -0
- package/dist/io/remoteFile.js +137 -206
- package/dist/io/remoteFile.js.map +1 -0
- package/dist/rans/constants.d.ts +3 -0
- package/dist/rans/constants.js +6 -6
- package/dist/rans/constants.js.map +1 -0
- package/dist/rans/d04.d.ts +1 -0
- package/dist/rans/d04.js +70 -99
- package/dist/rans/d04.js.map +1 -0
- package/dist/rans/d14.d.ts +1 -0
- package/dist/rans/d14.js +55 -93
- package/dist/rans/d14.js.map +1 -0
- package/dist/rans/decoding.d.ts +30 -0
- package/dist/rans/decoding.js +112 -159
- package/dist/rans/decoding.js.map +1 -0
- package/dist/rans/frequencies.d.ts +2 -0
- package/dist/rans/frequencies.js +110 -119
- package/dist/rans/frequencies.js.map +1 -0
- package/dist/rans/index.d.ts +1 -0
- package/dist/rans/index.js +111 -174
- package/dist/rans/index.js.map +1 -0
- package/dist/sam.d.ts +1 -0
- package/dist/sam.js +16 -41
- package/dist/sam.js.map +1 -0
- package/dist/unzip-pako.d.ts +2 -0
- package/dist/unzip-pako.js +9 -0
- package/dist/unzip-pako.js.map +1 -0
- package/dist/unzip.d.ts +2 -0
- package/dist/unzip.js +6 -0
- package/dist/unzip.js.map +1 -0
- package/errors.js +66 -103
- package/esm/craiIndex.d.ts +37 -0
- package/esm/craiIndex.js +158 -0
- package/esm/craiIndex.js.map +1 -0
- package/esm/cramFile/codecs/_base.d.ts +6 -0
- package/esm/cramFile/codecs/_base.js +42 -0
- package/esm/cramFile/codecs/_base.js.map +1 -0
- package/esm/cramFile/codecs/beta.d.ts +4 -0
- package/esm/cramFile/codecs/beta.js +15 -0
- package/esm/cramFile/codecs/beta.js.map +1 -0
- package/esm/cramFile/codecs/byteArrayLength.d.ts +8 -0
- package/esm/cramFile/codecs/byteArrayLength.js +35 -0
- package/esm/cramFile/codecs/byteArrayLength.js.map +1 -0
- package/esm/cramFile/codecs/byteArrayStop.d.ts +6 -0
- package/esm/cramFile/codecs/byteArrayStop.js +40 -0
- package/esm/cramFile/codecs/byteArrayStop.js.map +1 -0
- package/esm/cramFile/codecs/external.d.ts +7 -0
- package/esm/cramFile/codecs/external.js +40 -0
- package/esm/cramFile/codecs/external.js.map +1 -0
- package/esm/cramFile/codecs/gamma.d.ts +4 -0
- package/esm/cramFile/codecs/gamma.js +20 -0
- package/esm/cramFile/codecs/gamma.js.map +1 -0
- package/esm/cramFile/codecs/huffman.d.ts +17 -0
- package/esm/cramFile/codecs/huffman.js +107 -0
- package/esm/cramFile/codecs/huffman.js.map +1 -0
- package/esm/cramFile/codecs/index.d.ts +2 -0
- package/esm/cramFile/codecs/index.js +30 -0
- package/esm/cramFile/codecs/index.js.map +1 -0
- package/esm/cramFile/codecs/subexp.d.ts +4 -0
- package/esm/cramFile/codecs/subexp.js +28 -0
- package/esm/cramFile/codecs/subexp.js.map +1 -0
- package/esm/cramFile/constants.d.ts +36 -0
- package/esm/cramFile/constants.js +51 -0
- package/esm/cramFile/constants.js.map +1 -0
- package/esm/cramFile/container/compressionScheme.d.ts +23 -0
- package/esm/cramFile/container/compressionScheme.js +123 -0
- package/esm/cramFile/container/compressionScheme.js.map +1 -0
- package/esm/cramFile/container/index.d.ts +13 -0
- package/esm/cramFile/container/index.js +84 -0
- package/esm/cramFile/container/index.js.map +1 -0
- package/esm/cramFile/file.d.ts +63 -0
- package/esm/cramFile/file.js +281 -0
- package/esm/cramFile/file.js.map +1 -0
- package/esm/cramFile/index.d.ts +2 -0
- package/esm/cramFile/index.js +3 -0
- package/esm/cramFile/index.js.map +1 -0
- package/esm/cramFile/record.d.ts +79 -0
- package/esm/cramFile/record.js +297 -0
- package/esm/cramFile/record.js.map +1 -0
- package/esm/cramFile/sectionParsers.d.ts +18 -0
- package/esm/cramFile/sectionParsers.js +347 -0
- package/esm/cramFile/sectionParsers.js.map +1 -0
- package/esm/cramFile/slice/decodeRecord.d.ts +2 -0
- package/esm/cramFile/slice/decodeRecord.js +299 -0
- package/esm/cramFile/slice/decodeRecord.js.map +1 -0
- package/esm/cramFile/slice/index.d.ts +20 -0
- package/esm/cramFile/slice/index.js +364 -0
- package/esm/cramFile/slice/index.js.map +1 -0
- package/esm/cramFile/util.d.ts +5 -0
- package/esm/cramFile/util.js +161 -0
- package/esm/cramFile/util.js.map +1 -0
- package/esm/errors.d.ts +23 -0
- package/esm/errors.js +24 -0
- package/esm/errors.js.map +1 -0
- package/esm/index.d.ts +4 -0
- package/esm/index.js +5 -0
- package/esm/index.js.map +1 -0
- package/esm/indexedCramFile.d.ts +39 -0
- package/esm/indexedCramFile.js +155 -0
- package/esm/indexedCramFile.js.map +1 -0
- package/esm/io/bufferCache.d.ts +12 -0
- package/esm/io/bufferCache.js +54 -0
- package/esm/io/bufferCache.js.map +1 -0
- package/esm/io/index.d.ts +5 -0
- package/esm/io/index.js +24 -0
- package/esm/io/index.js.map +1 -0
- package/esm/io/localFile.d.ts +10 -0
- package/esm/io/localFile.js +31 -0
- package/esm/io/localFile.js.map +1 -0
- package/esm/io/remoteFile.d.ts +16 -0
- package/esm/io/remoteFile.js +64 -0
- package/esm/io/remoteFile.js.map +1 -0
- package/esm/rans/constants.d.ts +3 -0
- package/esm/rans/constants.js +5 -0
- package/esm/rans/constants.js.map +1 -0
- package/esm/rans/d04.d.ts +1 -0
- package/esm/rans/d04.js +67 -0
- package/esm/rans/d04.js.map +1 -0
- package/esm/rans/d14.d.ts +1 -0
- package/esm/rans/d14.js +52 -0
- package/esm/rans/d14.js.map +1 -0
- package/esm/rans/decoding.d.ts +30 -0
- package/esm/rans/decoding.js +118 -0
- package/esm/rans/decoding.js.map +1 -0
- package/esm/rans/frequencies.d.ts +2 -0
- package/esm/rans/frequencies.js +110 -0
- package/esm/rans/frequencies.js.map +1 -0
- package/esm/rans/index.d.ts +1 -0
- package/esm/rans/index.js +195 -0
- package/esm/rans/index.js.map +1 -0
- package/esm/sam.d.ts +1 -0
- package/esm/sam.js +16 -0
- package/esm/sam.js.map +1 -0
- package/esm/unzip-pako.d.ts +2 -0
- package/esm/unzip-pako.js +5 -0
- package/esm/unzip-pako.js.map +1 -0
- package/esm/unzip.d.ts +2 -0
- package/esm/unzip.js +3 -0
- package/esm/unzip.js.map +1 -0
- package/package.json +38 -35
- package/src/craiIndex.js +180 -0
- package/src/cramFile/codecs/_base.js +49 -0
- package/src/cramFile/codecs/beta.js +23 -0
- package/src/cramFile/codecs/byteArrayLength.js +55 -0
- package/src/cramFile/codecs/byteArrayStop.js +50 -0
- package/src/cramFile/codecs/external.js +54 -0
- package/src/cramFile/codecs/gamma.js +30 -0
- package/src/cramFile/codecs/huffman.js +137 -0
- package/src/cramFile/codecs/index.js +38 -0
- package/src/cramFile/codecs/subexp.js +32 -0
- package/src/cramFile/constants.js +55 -0
- package/src/cramFile/container/compressionScheme.js +144 -0
- package/src/cramFile/container/index.js +119 -0
- package/src/cramFile/file.js +347 -0
- package/src/cramFile/index.js +3 -0
- package/src/cramFile/record.js +337 -0
- package/src/cramFile/sectionParsers.js +379 -0
- package/src/cramFile/slice/decodeRecord.js +362 -0
- package/src/cramFile/slice/index.js +497 -0
- package/src/cramFile/util.js +169 -0
- package/src/errors.js +22 -0
- package/src/index.js +5 -0
- package/src/indexedCramFile.js +191 -0
- package/src/io/bufferCache.js +66 -0
- package/src/io/index.js +26 -0
- package/src/io/localFile.js +35 -0
- package/src/io/remoteFile.js +71 -0
- package/src/rans/README.md +1 -0
- package/src/rans/constants.js +5 -0
- package/src/rans/d04.js +83 -0
- package/src/rans/d14.js +59 -0
- package/src/rans/decoding.js +141 -0
- package/src/rans/frequencies.js +121 -0
- package/src/rans/index.js +249 -0
- package/src/sam.js +15 -0
- package/src/unzip-pako.ts +5 -0
- package/src/unzip.ts +2 -0
|
@@ -1,56 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
6
|
-
|
|
7
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
8
|
-
|
|
9
|
-
var _require = require('../../errors'),
|
|
10
|
-
CramBufferOverrunError = _require.CramBufferOverrunError;
|
|
11
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var errors_1 = require("../../errors");
|
|
12
4
|
var validDataTypes = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
var CramCodec =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} // decode(slice, coreDataBlock, blocksByContentId, cursors) {
|
|
32
|
-
// }
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
(0, _createClass2.default)(CramCodec, [{
|
|
36
|
-
key: "_getBits",
|
|
37
|
-
value: function _getBits(data, cursor, numBits) {
|
|
38
|
-
var val = 0;
|
|
39
|
-
if (cursor.bytePosition + (7 - cursor.bitPosition + numBits) / 8 > data.length) throw new CramBufferOverrunError('read error during decoding. the file seems to be truncated.');
|
|
40
|
-
|
|
41
|
-
for (var dlen = numBits; dlen; dlen -= 1) {
|
|
42
|
-
// get the next `dlen` bits in the input, put them in val
|
|
43
|
-
val <<= 1;
|
|
44
|
-
val |= data[cursor.bytePosition] >> cursor.bitPosition & 1;
|
|
45
|
-
cursor.bitPosition -= 1;
|
|
46
|
-
if (cursor.bitPosition < 0) cursor.bytePosition += 1;
|
|
47
|
-
cursor.bitPosition &= 7;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return val;
|
|
5
|
+
int: true,
|
|
6
|
+
byte: true,
|
|
7
|
+
long: true,
|
|
8
|
+
byteArray: true,
|
|
9
|
+
byteArrayBlock: true,
|
|
10
|
+
};
|
|
11
|
+
// codec base class
|
|
12
|
+
var CramCodec = /** @class */ (function () {
|
|
13
|
+
function CramCodec(parameters, dataType) {
|
|
14
|
+
if (parameters === void 0) { parameters = {}; }
|
|
15
|
+
this.parameters = parameters;
|
|
16
|
+
this.dataType = dataType;
|
|
17
|
+
if (!dataType) {
|
|
18
|
+
throw new TypeError('must provide a data type to codec constructor');
|
|
19
|
+
}
|
|
20
|
+
if (!validDataTypes[dataType]) {
|
|
21
|
+
throw new TypeError("invalid data type ".concat(dataType));
|
|
22
|
+
}
|
|
51
23
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
24
|
+
// decode(slice, coreDataBlock, blocksByContentId, cursors) {
|
|
25
|
+
// }
|
|
26
|
+
CramCodec.prototype._getBits = function (data, cursor, numBits) {
|
|
27
|
+
var val = 0;
|
|
28
|
+
if (cursor.bytePosition + (7 - cursor.bitPosition + numBits) / 8 >
|
|
29
|
+
data.length) {
|
|
30
|
+
throw new errors_1.CramBufferOverrunError('read error during decoding. the file seems to be truncated.');
|
|
31
|
+
}
|
|
32
|
+
for (var dlen = numBits; dlen; dlen -= 1) {
|
|
33
|
+
// get the next `dlen` bits in the input, put them in val
|
|
34
|
+
val <<= 1;
|
|
35
|
+
val |= (data[cursor.bytePosition] >> cursor.bitPosition) & 1;
|
|
36
|
+
cursor.bitPosition -= 1;
|
|
37
|
+
if (cursor.bitPosition < 0) {
|
|
38
|
+
cursor.bytePosition += 1;
|
|
39
|
+
}
|
|
40
|
+
cursor.bitPosition &= 7;
|
|
41
|
+
}
|
|
42
|
+
return val;
|
|
43
|
+
};
|
|
44
|
+
return CramCodec;
|
|
45
|
+
}());
|
|
46
|
+
exports.default = CramCodec;
|
|
47
|
+
//# sourceMappingURL=_base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_base.js","sourceRoot":"","sources":["../../../src/cramFile/codecs/_base.js"],"names":[],"mappings":";;AAAA,uCAAqD;AAErD,IAAM,cAAc,GAAG;IACrB,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,IAAI;IACf,cAAc,EAAE,IAAI;CACrB,CAAA;AAED,mBAAmB;AACnB;IACE,mBAAY,UAAe,EAAE,QAAQ;QAAzB,2BAAA,EAAA,eAAe;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,IAAI,SAAS,CAAC,+CAA+C,CAAC,CAAA;SACrE;QACD,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;YAC7B,MAAM,IAAI,SAAS,CAAC,4BAAqB,QAAQ,CAAE,CAAC,CAAA;SACrD;IACH,CAAC;IAED,6DAA6D;IAC7D,IAAI;IAEJ,4BAAQ,GAAR,UAAS,IAAI,EAAE,MAAM,EAAE,OAAO;QAC5B,IAAI,GAAG,GAAG,CAAC,CAAA;QACX,IACE,MAAM,CAAC,YAAY,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC;YAC5D,IAAI,CAAC,MAAM,EACX;YACA,MAAM,IAAI,+BAAsB,CAC9B,6DAA6D,CAC9D,CAAA;SACF;QACD,KAAK,IAAI,IAAI,GAAG,OAAO,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,EAAE;YACxC,yDAAyD;YACzD,GAAG,KAAK,CAAC,CAAA;YACT,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;YAC5D,MAAM,CAAC,WAAW,IAAI,CAAC,CAAA;YACvB,IAAI,MAAM,CAAC,WAAW,GAAG,CAAC,EAAE;gBAC1B,MAAM,CAAC,YAAY,IAAI,CAAC,CAAA;aACzB;YACD,MAAM,CAAC,WAAW,IAAI,CAAC,CAAA;SACxB;QACD,OAAO,GAAG,CAAA;IACZ,CAAC;IACH,gBAAC;AAAD,CAAC,AArCD,IAqCC"}
|
|
@@ -1,50 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (_this.dataType !== 'int') {
|
|
34
|
-
throw new CramUnimplementedError("".concat(_this.dataType, " decoding not yet implemented by BETA codec"));
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
var errors_1 = require("../../errors");
|
|
22
|
+
var _base_1 = __importDefault(require("./_base"));
|
|
23
|
+
var BetaCodec = /** @class */ (function (_super) {
|
|
24
|
+
__extends(BetaCodec, _super);
|
|
25
|
+
function BetaCodec(parameters, dataType) {
|
|
26
|
+
if (parameters === void 0) { parameters = {}; }
|
|
27
|
+
var _this = _super.call(this, parameters, dataType) || this;
|
|
28
|
+
if (_this.dataType !== 'int') {
|
|
29
|
+
throw new errors_1.CramUnimplementedError("".concat(_this.dataType, " decoding not yet implemented by BETA codec"));
|
|
30
|
+
}
|
|
31
|
+
return _this;
|
|
35
32
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return data;
|
|
45
|
-
}
|
|
46
|
-
}]);
|
|
47
|
-
return BetaCodec;
|
|
48
|
-
}(CramCodec);
|
|
49
|
-
|
|
50
|
-
module.exports = BetaCodec;
|
|
33
|
+
BetaCodec.prototype.decode = function (slice, coreDataBlock, blocksByContentId, cursors) {
|
|
34
|
+
var data = this._getBits(coreDataBlock.content, cursors.coreBlock, this.parameters.length) - this.parameters.offset;
|
|
35
|
+
return data;
|
|
36
|
+
};
|
|
37
|
+
return BetaCodec;
|
|
38
|
+
}(_base_1.default));
|
|
39
|
+
exports.default = BetaCodec;
|
|
40
|
+
//# sourceMappingURL=beta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"beta.js","sourceRoot":"","sources":["../../../src/cramFile/codecs/beta.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,uCAAqD;AACrD,kDAA+B;AAE/B;IAAuC,6BAAS;IAC9C,mBAAY,UAAe,EAAE,QAAQ;QAAzB,2BAAA,EAAA,eAAe;QAA3B,YACE,kBAAM,UAAU,EAAE,QAAQ,CAAC,SAM5B;QALC,IAAI,KAAI,CAAC,QAAQ,KAAK,KAAK,EAAE;YAC3B,MAAM,IAAI,+BAAsB,CAC9B,UAAG,KAAI,CAAC,QAAQ,gDAA6C,CAC9D,CAAA;SACF;;IACH,CAAC;IAED,0BAAM,GAAN,UAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,OAAO;QACrD,IAAM,IAAI,GACR,IAAI,CAAC,QAAQ,CACX,aAAa,CAAC,OAAO,EACrB,OAAO,CAAC,SAAS,EACjB,IAAI,CAAC,UAAU,CAAC,MAAM,CACvB,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAA;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;IACH,gBAAC;AAAD,CAAC,AAnBD,CAAuC,eAAS,GAmB/C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default class ByteArrayStopCodec extends CramCodec {
|
|
2
|
+
constructor(parameters: {} | undefined, dataType: any, instantiateCodec: any);
|
|
3
|
+
instantiateCodec: any;
|
|
4
|
+
decode(slice: any, coreDataBlock: any, blocksByContentId: any, cursors: any): any[];
|
|
5
|
+
_getLengthCodec(): any;
|
|
6
|
+
_getDataCodec(): any;
|
|
7
|
+
}
|
|
8
|
+
import CramCodec from "./_base";
|
|
@@ -1,80 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var dataType = arguments.length > 1 ? arguments[1] : undefined;
|
|
34
|
-
var instantiateCodec = arguments.length > 2 ? arguments[2] : undefined;
|
|
35
|
-
(0, _classCallCheck2.default)(this, ByteArrayStopCodec);
|
|
36
|
-
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ByteArrayStopCodec).call(this, parameters, dataType));
|
|
37
|
-
_this.instantiateCodec = instantiateCodec;
|
|
38
|
-
if (dataType !== 'byteArray') throw new TypeError("byteArrayLength does not support data type ".concat(dataType));
|
|
39
|
-
return _this;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
(0, _createClass2.default)(ByteArrayStopCodec, [{
|
|
43
|
-
key: "decode",
|
|
44
|
-
value: function decode(slice, coreDataBlock, blocksByContentId, cursors) {
|
|
45
|
-
var lengthCodec = this._getLengthCodec();
|
|
46
|
-
|
|
47
|
-
var arrayLength = lengthCodec.decode(slice, coreDataBlock, blocksByContentId, cursors);
|
|
48
|
-
|
|
49
|
-
var dataCodec = this._getDataCodec();
|
|
50
|
-
|
|
51
|
-
var data = new Array(arrayLength);
|
|
52
|
-
|
|
53
|
-
for (var i = 0; i < arrayLength; i += 1) {
|
|
54
|
-
data[i] = dataCodec.decode(slice, coreDataBlock, blocksByContentId, cursors);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return data;
|
|
58
|
-
} // memoize
|
|
59
|
-
|
|
60
|
-
}, {
|
|
61
|
-
key: "_getLengthCodec",
|
|
62
|
-
value: function _getLengthCodec() {
|
|
63
|
-
var encodingParams = this.parameters.lengthsEncoding;
|
|
64
|
-
return this.instantiateCodec(encodingParams, 'int');
|
|
65
|
-
} // memoize
|
|
66
|
-
|
|
67
|
-
}, {
|
|
68
|
-
key: "_getDataCodec",
|
|
69
|
-
value: function _getDataCodec() {
|
|
70
|
-
var encodingParams = this.parameters.valuesEncoding;
|
|
71
|
-
return this.instantiateCodec(encodingParams, 'byte');
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
var util_1 = require("../util");
|
|
22
|
+
var _base_1 = __importDefault(require("./_base"));
|
|
23
|
+
var ByteArrayStopCodec = /** @class */ (function (_super) {
|
|
24
|
+
__extends(ByteArrayStopCodec, _super);
|
|
25
|
+
function ByteArrayStopCodec(parameters, dataType, instantiateCodec) {
|
|
26
|
+
if (parameters === void 0) { parameters = {}; }
|
|
27
|
+
var _this = _super.call(this, parameters, dataType) || this;
|
|
28
|
+
_this.instantiateCodec = instantiateCodec;
|
|
29
|
+
if (dataType !== 'byteArray') {
|
|
30
|
+
throw new TypeError("byteArrayLength does not support data type ".concat(dataType));
|
|
31
|
+
}
|
|
32
|
+
return _this;
|
|
72
33
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
34
|
+
ByteArrayStopCodec.prototype.decode = function (slice, coreDataBlock, blocksByContentId, cursors) {
|
|
35
|
+
var lengthCodec = this._getLengthCodec();
|
|
36
|
+
var arrayLength = lengthCodec.decode(slice, coreDataBlock, blocksByContentId, cursors);
|
|
37
|
+
var dataCodec = this._getDataCodec();
|
|
38
|
+
var data = new Array(arrayLength);
|
|
39
|
+
for (var i = 0; i < arrayLength; i += 1) {
|
|
40
|
+
data[i] = dataCodec.decode(slice, coreDataBlock, blocksByContentId, cursors);
|
|
41
|
+
}
|
|
42
|
+
return data;
|
|
43
|
+
};
|
|
44
|
+
// memoize
|
|
45
|
+
ByteArrayStopCodec.prototype._getLengthCodec = function () {
|
|
46
|
+
var encodingParams = this.parameters.lengthsEncoding;
|
|
47
|
+
return this.instantiateCodec(encodingParams, 'int');
|
|
48
|
+
};
|
|
49
|
+
// memoize
|
|
50
|
+
ByteArrayStopCodec.prototype._getDataCodec = function () {
|
|
51
|
+
var encodingParams = this.parameters.valuesEncoding;
|
|
52
|
+
return this.instantiateCodec(encodingParams, 'byte');
|
|
53
|
+
};
|
|
54
|
+
return ByteArrayStopCodec;
|
|
55
|
+
}(_base_1.default));
|
|
56
|
+
exports.default = ByteArrayStopCodec;
|
|
57
|
+
'_getLengthCodec _getDataCodec'
|
|
58
|
+
.split(' ')
|
|
59
|
+
.forEach(function (method) { return (0, util_1.tinyMemoize)(ByteArrayStopCodec, method); });
|
|
60
|
+
//# sourceMappingURL=byteArrayLength.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"byteArrayLength.js","sourceRoot":"","sources":["../../../src/cramFile/codecs/byteArrayLength.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,gCAAqC;AAErC,kDAA+B;AAE/B;IAAgD,sCAAS;IACvD,4BAAY,UAAe,EAAE,QAAQ,EAAE,gBAAgB;QAA3C,2BAAA,EAAA,eAAe;QAA3B,YACE,kBAAM,UAAU,EAAE,QAAQ,CAAC,SAO5B;QANC,KAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;QACxC,IAAI,QAAQ,KAAK,WAAW,EAAE;YAC5B,MAAM,IAAI,SAAS,CACjB,qDAA8C,QAAQ,CAAE,CACzD,CAAA;SACF;;IACH,CAAC;IAED,mCAAM,GAAN,UAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,OAAO;QACrD,IAAM,WAAW,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;QAC1C,IAAM,WAAW,GAAG,WAAW,CAAC,MAAM,CACpC,KAAK,EACL,aAAa,EACb,iBAAiB,EACjB,OAAO,CACR,CAAA;QAED,IAAM,SAAS,GAAG,IAAI,CAAC,aAAa,EAAE,CAAA;QACtC,IAAM,IAAI,GAAG,IAAI,KAAK,CAAC,WAAW,CAAC,CAAA;QACnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,IAAI,CAAC,EAAE;YACvC,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,MAAM,CACxB,KAAK,EACL,aAAa,EACb,iBAAiB,EACjB,OAAO,CACR,CAAA;SACF;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAED,UAAU;IACV,4CAAe,GAAf;QACE,IAAM,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,eAAe,CAAA;QACtD,OAAO,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,KAAK,CAAC,CAAA;IACrD,CAAC;IAED,UAAU;IACV,0CAAa,GAAb;QACE,IAAM,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,cAAc,CAAA;QAErD,OAAO,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;IACtD,CAAC;IACH,yBAAC;AAAD,CAAC,AA9CD,CAAgD,eAAS,GA8CxD;;AAED,+BAA+B;KAC5B,KAAK,CAAC,GAAG,CAAC;KACV,OAAO,CAAC,UAAA,MAAM,IAAI,OAAA,IAAA,kBAAW,EAAC,kBAAkB,EAAE,MAAM,CAAC,EAAvC,CAAuC,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export default class ByteArrayStopCodec extends CramCodec {
|
|
2
|
+
_decode: (contentBlock: any, cursor: any) => any;
|
|
3
|
+
decode(slice: any, coreDataBlock: any, blocksByContentId: any, cursors: any): any;
|
|
4
|
+
_decodeByteArray(contentBlock: any, cursor: any): any;
|
|
5
|
+
}
|
|
6
|
+
import CramCodec from "./_base";
|
|
@@ -1,79 +1,65 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
var ByteArrayStopCodec =
|
|
24
|
-
|
|
25
|
-
function (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
(0, _classCallCheck2.default)(this, ByteArrayStopCodec);
|
|
34
|
-
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ByteArrayStopCodec).call(this, parameters, dataType));
|
|
35
|
-
|
|
36
|
-
if (dataType === 'byteArray') {
|
|
37
|
-
_this._decode = _this._decodeByteArray;
|
|
38
|
-
} else {
|
|
39
|
-
throw new TypeError("byteArrayStop codec does not support data type ".concat(dataType));
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return _this;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
(0, _createClass2.default)(ByteArrayStopCodec, [{
|
|
46
|
-
key: "decode",
|
|
47
|
-
value: function decode(slice, coreDataBlock, blocksByContentId, cursors) {
|
|
48
|
-
var blockContentId = this.parameters.blockContentId;
|
|
49
|
-
var contentBlock = blocksByContentId[blockContentId];
|
|
50
|
-
if (!contentBlock) throw new CramMalformedError("no block found with content ID ".concat(blockContentId));
|
|
51
|
-
var cursor = cursors.externalBlocks.getCursor(blockContentId);
|
|
52
|
-
return this._decode(contentBlock, cursor);
|
|
53
|
-
}
|
|
54
|
-
}, {
|
|
55
|
-
key: "_decodeByteArray",
|
|
56
|
-
value: function _decodeByteArray(contentBlock, cursor) {
|
|
57
|
-
var dataBuffer = contentBlock.content;
|
|
58
|
-
var stopByte = this.parameters.stopByte; // scan to the next stop byte
|
|
59
|
-
|
|
60
|
-
var startPosition = cursor.bytePosition;
|
|
61
|
-
var stopPosition = cursor.bytePosition;
|
|
62
|
-
|
|
63
|
-
while (dataBuffer[stopPosition] !== stopByte && stopPosition < dataBuffer.length) {
|
|
64
|
-
if (stopPosition === dataBuffer.length) {
|
|
65
|
-
throw new CramBufferOverrunError("byteArrayStop reading beyond length of data buffer?");
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
var errors_1 = require("../../errors");
|
|
22
|
+
var _base_1 = __importDefault(require("./_base"));
|
|
23
|
+
var ByteArrayStopCodec = /** @class */ (function (_super) {
|
|
24
|
+
__extends(ByteArrayStopCodec, _super);
|
|
25
|
+
function ByteArrayStopCodec(parameters, dataType) {
|
|
26
|
+
if (parameters === void 0) { parameters = {}; }
|
|
27
|
+
var _this = _super.call(this, parameters, dataType) || this;
|
|
28
|
+
if (dataType === 'byteArray') {
|
|
29
|
+
_this._decode = _this._decodeByteArray;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
throw new TypeError("byteArrayStop codec does not support data type ".concat(dataType));
|
|
66
33
|
}
|
|
67
|
-
|
|
68
|
-
stopPosition += 1;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
cursor.bytePosition = stopPosition + 1;
|
|
72
|
-
var data = (0, _slice.default)(dataBuffer).call(dataBuffer, startPosition, stopPosition);
|
|
73
|
-
return data;
|
|
34
|
+
return _this;
|
|
74
35
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
36
|
+
ByteArrayStopCodec.prototype.decode = function (slice, coreDataBlock, blocksByContentId, cursors) {
|
|
37
|
+
var blockContentId = this.parameters.blockContentId;
|
|
38
|
+
var contentBlock = blocksByContentId[blockContentId];
|
|
39
|
+
if (!contentBlock) {
|
|
40
|
+
throw new errors_1.CramMalformedError("no block found with content ID ".concat(blockContentId));
|
|
41
|
+
}
|
|
42
|
+
var cursor = cursors.externalBlocks.getCursor(blockContentId);
|
|
43
|
+
return this._decode(contentBlock, cursor);
|
|
44
|
+
};
|
|
45
|
+
ByteArrayStopCodec.prototype._decodeByteArray = function (contentBlock, cursor) {
|
|
46
|
+
var dataBuffer = contentBlock.content;
|
|
47
|
+
var stopByte = this.parameters.stopByte;
|
|
48
|
+
// scan to the next stop byte
|
|
49
|
+
var startPosition = cursor.bytePosition;
|
|
50
|
+
var stopPosition = cursor.bytePosition;
|
|
51
|
+
while (dataBuffer[stopPosition] !== stopByte &&
|
|
52
|
+
stopPosition < dataBuffer.length) {
|
|
53
|
+
if (stopPosition === dataBuffer.length) {
|
|
54
|
+
throw new errors_1.CramBufferOverrunError("byteArrayStop reading beyond length of data buffer?");
|
|
55
|
+
}
|
|
56
|
+
stopPosition += 1;
|
|
57
|
+
}
|
|
58
|
+
cursor.bytePosition = stopPosition + 1;
|
|
59
|
+
var data = dataBuffer.slice(startPosition, stopPosition);
|
|
60
|
+
return data;
|
|
61
|
+
};
|
|
62
|
+
return ByteArrayStopCodec;
|
|
63
|
+
}(_base_1.default));
|
|
64
|
+
exports.default = ByteArrayStopCodec;
|
|
65
|
+
//# sourceMappingURL=byteArrayStop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"byteArrayStop.js","sourceRoot":"","sources":["../../../src/cramFile/codecs/byteArrayStop.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,uCAAyE;AAEzE,kDAA+B;AAE/B;IAAgD,sCAAS;IACvD,4BAAY,UAAe,EAAE,QAAQ;QAAzB,2BAAA,EAAA,eAAe;QAA3B,YACE,kBAAM,UAAU,EAAE,QAAQ,CAAC,SAQ5B;QAPC,IAAI,QAAQ,KAAK,WAAW,EAAE;YAC5B,KAAI,CAAC,OAAO,GAAG,KAAI,CAAC,gBAAgB,CAAA;SACrC;aAAM;YACL,MAAM,IAAI,SAAS,CACjB,yDAAkD,QAAQ,CAAE,CAC7D,CAAA;SACF;;IACH,CAAC;IAED,mCAAM,GAAN,UAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,OAAO;QAC7C,IAAA,cAAc,GAAK,IAAI,CAAC,UAAU,eAApB,CAAoB;QAC1C,IAAM,YAAY,GAAG,iBAAiB,CAAC,cAAc,CAAC,CAAA;QACtD,IAAI,CAAC,YAAY,EAAE;YACjB,MAAM,IAAI,2BAAkB,CAC1B,yCAAkC,cAAc,CAAE,CACnD,CAAA;SACF;QACD,IAAM,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;IAC3C,CAAC;IAED,6CAAgB,GAAhB,UAAiB,YAAY,EAAE,MAAM;QACnC,IAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAA;QAC/B,IAAA,QAAQ,GAAK,IAAI,CAAC,UAAU,SAApB,CAAoB;QACpC,6BAA6B;QAC7B,IAAM,aAAa,GAAG,MAAM,CAAC,YAAY,CAAA;QACzC,IAAI,YAAY,GAAG,MAAM,CAAC,YAAY,CAAA;QACtC,OACE,UAAU,CAAC,YAAY,CAAC,KAAK,QAAQ;YACrC,YAAY,GAAG,UAAU,CAAC,MAAM,EAChC;YACA,IAAI,YAAY,KAAK,UAAU,CAAC,MAAM,EAAE;gBACtC,MAAM,IAAI,+BAAsB,CAC9B,qDAAqD,CACtD,CAAA;aACF;YACD,YAAY,IAAI,CAAC,CAAA;SAClB;QACD,MAAM,CAAC,YAAY,GAAG,YAAY,GAAG,CAAC,CAAA;QACtC,IAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,aAAa,EAAE,YAAY,CAAC,CAAA;QAC1D,OAAO,IAAI,CAAA;IACb,CAAC;IACH,yBAAC;AAAD,CAAC,AA7CD,CAAgD,eAAS,GA6CxD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export default class ExternalCodec extends CramCodec {
|
|
2
|
+
_decodeData: (contentBlock: any, cursor: any) => any;
|
|
3
|
+
decode(slice: any, coreDataBlock: any, blocksByContentId: any, cursors: any): any;
|
|
4
|
+
_decodeInt(contentBlock: any, cursor: any): any;
|
|
5
|
+
_decodeByte(contentBlock: any, cursor: any): any;
|
|
6
|
+
}
|
|
7
|
+
import CramCodec from "./_base";
|