@remusao/smaz-compress
Advanced tools
Comparing version 1.7.0 to 1.7.1-canary.11.2ca42da6a9af001f617b5624f2ef06c38c0fb2b0.0
@@ -5,6 +5,6 @@ "use strict"; | ||
require("mocha"); | ||
const index_1 = require("./index"); | ||
const _1 = require("."); | ||
describe('@remusao/smaz-compress', () => { | ||
it('compresses empty string', () => { | ||
const smaz = new index_1.SmazCompress([]); | ||
const smaz = new _1.SmazCompress([]); | ||
chai_1.expect(smaz.compress('')).to.be.empty; | ||
@@ -14,3 +14,3 @@ chai_1.expect(smaz.getCompressedSize('')).to.eql(0); | ||
it('compresses string not from codebook', () => { | ||
const smaz = new index_1.SmazCompress(['foo']); | ||
const smaz = new _1.SmazCompress(['foo']); | ||
chai_1.expect(smaz.getCompressedSize('bar')).to.equal(5); | ||
@@ -26,3 +26,3 @@ chai_1.expect(smaz.compress('bar')).to.deep.equal(new Uint8Array([ | ||
it('compresses string from codebook', () => { | ||
const smaz = new index_1.SmazCompress(['foo']); | ||
const smaz = new _1.SmazCompress(['foo']); | ||
chai_1.expect(smaz.getCompressedSize('foo')).to.be.equal(1); | ||
@@ -32,3 +32,3 @@ chai_1.expect(smaz.compress('foo')).to.deep.equal(new Uint8Array([0])); | ||
it('compresses with a mix', () => { | ||
const smaz = new index_1.SmazCompress(['foo']); | ||
const smaz = new _1.SmazCompress(['foo']); | ||
chai_1.expect(smaz.getCompressedSize('barfoob')).to.be.equal(8); | ||
@@ -58,3 +58,3 @@ chai_1.expect(smaz.compress('barfoob')).to.deep.equal(new Uint8Array([ | ||
it('handles ambiguous codebook', () => { | ||
const smaz = new index_1.SmazCompress([ | ||
const smaz = new _1.SmazCompress([ | ||
'f', | ||
@@ -89,3 +89,3 @@ 'fo', | ||
it('fills verbatim buffer', () => { | ||
const smaz = new index_1.SmazCompress(['foo']); | ||
const smaz = new _1.SmazCompress(['foo']); | ||
let str = ''; | ||
@@ -92,0 +92,0 @@ for (let i = 0; i <= 256; i += 1) { |
import { expect } from 'chai'; | ||
import 'mocha'; | ||
import { SmazCompress } from './index'; | ||
import { SmazCompress } from '.'; | ||
describe('@remusao/smaz-compress', () => { | ||
@@ -5,0 +5,0 @@ it('compresses empty string', () => { |
{ | ||
"name": "@remusao/smaz-compress", | ||
"version": "1.7.0", | ||
"version": "1.7.1-canary.11.2ca42da6a9af001f617b5624f2ef06c38c0fb2b0.0", | ||
"description": "Compress strings using custom codebooks", | ||
@@ -10,2 +10,3 @@ "author": "Rémi Berson <remi@cliqz.com>", | ||
"module": "dist/es6/index.js", | ||
"types": "dist/types/index.d.ts", | ||
"files": [ | ||
@@ -36,3 +37,3 @@ "dist" | ||
"dependencies": { | ||
"@remusao/trie": "^1.2.0" | ||
"@remusao/trie": "1.2.1-canary.11.2ca42da6a9af001f617b5624f2ef06c38c0fb2b0.0" | ||
}, | ||
@@ -50,3 +51,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "1443e79b010ec34e047cb1c270b7ebd649e1c1a9" | ||
"gitHead": "2ca42da6a9af001f617b5624f2ef06c38c0fb2b0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
242538
1
+ Added@remusao/trie@1.2.1-canary.11.2ca42da6a9af001f617b5624f2ef06c38c0fb2b0.0(transitive)
- Removed@remusao/trie@1.5.0(transitive)
Updated@remusao/trie@1.2.1-canary.11.2ca42da6a9af001f617b5624f2ef06c38c0fb2b0.0