@gaialabs/core 0.1.17 → 0.1.18

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.js CHANGED
@@ -30,7 +30,12 @@ var QuintetLZ = class _QuintetLZ {
30
30
  dictionary.fill(_QuintetLZ.DICTIONARY_INIT);
31
31
  let dictPosition = _QuintetLZ.DICTIONARY_OFFSET;
32
32
  let outPosition = 0;
33
- const dstLen = bitStream.readShort();
33
+ let dstLen = bitStream.readShort();
34
+ if (dstLen === 0) {
35
+ return srcData.slice(srcPosition + 2, srcStop);
36
+ } else if (dstLen & 32768) {
37
+ dstLen = 65536 - dstLen;
38
+ }
34
39
  const outBuffer = new Uint8Array(dstLen);
35
40
  while (bitStream.currentPosition < srcStop && outPosition < dstLen) {
36
41
  if (bitStream.readBit()) {