|
6 | 6 | *FastIntegerCompression |
7 | 7 | * Simple usage : |
8 | 8 | * // var FastIntegerCompression = require("fastintcompression");// if you use node |
9 | | - * var b = new FastBitSet();// initially empty |
10 | | - * b.add(1);// add the value "1" |
11 | | - * b.has(1); // check that the value is present! (will return true) |
12 | | - * b.add(2); |
13 | | - * console.log(""+b);// should display {1,2} |
14 | | - * b.add(10); |
15 | | - * b.array(); // would return [1,2,10] |
| 9 | + * var array = [10,100000,65999,10,10,0,1,1,2000]; |
| 10 | + * var buf = FastIntegerCompression.compress(array); |
| 11 | + * var back = FastIntegerCompression.uncompress(buf); // gets back [10,100000,65999,10,10,0,1,1,2000] |
16 | 12 | * |
17 | | - * var c = new FastBitSet([1,2,3,10]); // create bitset initialized with values 1,2,3,10 |
18 | | - * c.difference(b); // from c, remove elements that are in b |
19 | | - * var su = c.union_size(b);// compute the size of the union (bitsets are unchanged) |
20 | | - * c.union(b); // c will contain all elements that are in c and b |
21 | | - * var s1 = c.intersection_size(b);// compute the size of the intersection (bitsets are unchanged) |
22 | | - * c.intersection(b); // c will only contain elements that are in both c and b |
23 | | - * c = b.clone(); // create a (deep) copy of b and assign it to c. |
24 | | - * c.equals(b); // check whether c and b are equal |
25 | | - * |
26 | | - * See README.md file for a more complete description. |
27 | 13 | * |
28 | 14 | * You can install the library under node with the command line |
29 | | - * npm install fastbitset |
| 15 | + * npm install fastintcompression |
30 | 16 | */ |
31 | 17 | 'use strict'; |
32 | 18 |
|
|
0 commit comments