@thi.ng/rle-pack 3.1.67 → 3.1.69
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 +7 -1
- package/README.md +1 -1
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2024-
|
|
3
|
+
- **Last updated**: 2024-06-21T19:34:38Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
### [3.1.69](https://github.com/thi-ng/umbrella/tree/@thi.ng/rle-pack@3.1.69) (2024-06-21)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- enforce uniform naming convention of internal functions ([56992b2](https://github.com/thi-ng/umbrella/commit/56992b2))
|
|
17
|
+
|
|
12
18
|
### [3.1.39](https://github.com/thi-ng/umbrella/tree/@thi.ng/rle-pack@3.1.39) (2023-11-09)
|
|
13
19
|
|
|
14
20
|
#### ♻️ Refactoring
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 193 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
package/index.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ export type RLESizes = [number, number, number, number];
|
|
|
9
9
|
* @param rleSizes - run-length group sizes (in bits, max. 16)
|
|
10
10
|
*/
|
|
11
11
|
export declare const encode: (src: Iterable<number>, num: number, wordSize?: number, rleSizes?: RLESizes) => Uint8Array;
|
|
12
|
-
export declare const decode: (src: Uint8Array) => Uint8Array |
|
|
12
|
+
export declare const decode: (src: Uint8Array) => Uint8Array | Uint32Array | Uint16Array;
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -73,7 +73,7 @@ const decode = (src) => {
|
|
|
73
73
|
const num = input.read(32);
|
|
74
74
|
const wordSize = input.read(5) + 1;
|
|
75
75
|
const rleSizes = [0, 0, 0, 0].map(() => input.read(4) + 1);
|
|
76
|
-
const out =
|
|
76
|
+
const out = __arrayForWordSize(wordSize, num);
|
|
77
77
|
let x, j;
|
|
78
78
|
for (let i = 0; i < num; ) {
|
|
79
79
|
x = input.readBit();
|
|
@@ -89,7 +89,7 @@ const decode = (src) => {
|
|
|
89
89
|
}
|
|
90
90
|
return out;
|
|
91
91
|
};
|
|
92
|
-
const
|
|
92
|
+
const __arrayForWordSize = (ws, n) => {
|
|
93
93
|
return new (ws < 9 ? Uint8Array : ws < 17 ? Uint16Array : Uint32Array)(n);
|
|
94
94
|
};
|
|
95
95
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/rle-pack",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.69",
|
|
4
4
|
"description": "Binary run-length encoding packer w/ flexible repeat bit widths",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/thi-ng/umbrella.git"
|
|
12
12
|
},
|
|
13
|
-
"homepage": "https://
|
|
13
|
+
"homepage": "https://thi.ng/rle-pack",
|
|
14
14
|
"funding": [
|
|
15
15
|
{
|
|
16
16
|
"type": "github",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@thi.ng/bitstream": "^2.2.
|
|
40
|
-
"@thi.ng/errors": "^2.5.
|
|
39
|
+
"@thi.ng/bitstream": "^2.2.61",
|
|
40
|
+
"@thi.ng/errors": "^2.5.8"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@microsoft/api-extractor": "^7.
|
|
44
|
-
"esbuild": "^0.
|
|
45
|
-
"typedoc": "^0.25.
|
|
46
|
-
"typescript": "^5.
|
|
43
|
+
"@microsoft/api-extractor": "^7.47.0",
|
|
44
|
+
"esbuild": "^0.21.5",
|
|
45
|
+
"typedoc": "^0.25.13",
|
|
46
|
+
"typescript": "^5.5.2"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"array",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
],
|
|
80
80
|
"year": 2017
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "154c95cf9d6bab32174498ec3b5b5d87e42be7f9\n"
|
|
83
83
|
}
|