We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdfa745 commit 94432a8Copy full SHA for 94432a8
1 file changed
tasks/bundle-wasm.ts
@@ -1,6 +1,7 @@
1
import { brotliCompressSync, constants } from "node:zlib";
2
3
-const Z85 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#";
+const Z85 =
4
+ "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#";
5
6
function encodeZ85(data: Uint8Array): string {
7
const padLen = (4 - (data.length % 4)) % 4;
@@ -11,7 +12,8 @@ function encodeZ85(data: Uint8Array): string {
11
12
}
13
const out: string[] = [];
14
for (let i = 0; i < src.length; i += 4) {
- const v = src[i] * 16777216 + src[i + 1] * 65536 + src[i + 2] * 256 + src[i + 3];
15
+ const v = src[i] * 16777216 + src[i + 1] * 65536 + src[i + 2] * 256 +
16
+ src[i + 3];
17
out.push(
18
Z85[Math.floor(v / 52200625)],
19
Z85[Math.floor(v / 614125) % 85],
0 commit comments