@gmod/cram 4.0.7 → 4.0.9
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/cram-bundle.js +1 -1
- package/dist/cramFile/file.js +15 -19
- package/dist/cramFile/file.js.map +1 -1
- package/dist/cramFile/slice/decodeRecord.js.map +1 -1
- package/dist/htscodecs/arith_gen.d.ts +1 -1
- package/dist/htscodecs/arith_gen.js +2 -14
- package/dist/htscodecs/arith_gen.js.map +1 -1
- package/esm/cramFile/file.js +11 -15
- package/esm/cramFile/file.js.map +1 -1
- package/esm/cramFile/slice/decodeRecord.js.map +1 -1
- package/esm/htscodecs/arith_gen.d.ts +1 -1
- package/esm/htscodecs/arith_gen.js +2 -14
- package/esm/htscodecs/arith_gen.js.map +1 -1
- package/package.json +2 -2
- package/src/cramFile/declare.d.ts +1 -1
- package/src/cramFile/file.ts +13 -15
- package/src/cramFile/slice/decodeRecord.ts +1 -0
- package/src/htscodecs/arith_gen.ts +2 -13
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
|
-
import
|
|
37
|
+
import Bunzip from 'seek-bzip'
|
|
38
38
|
|
|
39
39
|
import RangeCoder from './arith_sh'
|
|
40
40
|
import ByteModel from './byte_model'
|
|
@@ -154,18 +154,7 @@ export default class RangeCoderGen {
|
|
|
154
154
|
// ----------------------------------------------------------------------
|
|
155
155
|
// External codec
|
|
156
156
|
decodeExt(stream, n_out) {
|
|
157
|
-
|
|
158
|
-
let size = bzip2.header(bits)
|
|
159
|
-
let chunk
|
|
160
|
-
const chunks = []
|
|
161
|
-
do {
|
|
162
|
-
chunk = bzip2.decompress(bits, size)
|
|
163
|
-
if (chunk !== -1) {
|
|
164
|
-
chunks.push(chunk)
|
|
165
|
-
size -= chunk.length
|
|
166
|
-
}
|
|
167
|
-
} while (chunk !== -1)
|
|
168
|
-
return concatUint8Array(chunks)
|
|
157
|
+
return Bunzip.decode(stream.buf.slice(stream.pos))
|
|
169
158
|
}
|
|
170
159
|
|
|
171
160
|
// ----------------------------------------------------------------------
|