glotto 2.9.0 → 3.0.0
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/README.md +86 -55
- package/esm/cli.js +47 -39
- package/esm/deno.d.ts +0 -1
- package/esm/deno.js +1 -2
- package/esm/src/contants.d.ts +2 -2
- package/esm/src/contants.d.ts.map +1 -1
- package/esm/src/contants.js +22 -12
- package/esm/src/file.d.ts +2 -7
- package/esm/src/file.d.ts.map +1 -1
- package/esm/src/file.js +1 -108
- package/esm/src/providers/anthropic.d.ts +6 -11
- package/esm/src/providers/anthropic.d.ts.map +1 -1
- package/esm/src/providers/anthropic.js +14 -108
- package/esm/src/providers/gemini.d.ts +6 -11
- package/esm/src/providers/gemini.d.ts.map +1 -1
- package/esm/src/providers/gemini.js +13 -114
- package/esm/src/providers/openai.d.ts +6 -11
- package/esm/src/providers/openai.d.ts.map +1 -1
- package/esm/src/providers/openai.js +10 -109
- package/esm/src/translator.d.ts +8 -0
- package/esm/src/translator.d.ts.map +1 -0
- package/esm/src/translator.js +200 -0
- package/esm/src/types.d.ts +28 -11
- package/esm/src/types.d.ts.map +1 -1
- package/esm/src/utilites.d.ts +0 -6
- package/esm/src/utilites.d.ts.map +1 -1
- package/esm/src/utilites.js +18 -132
- package/package.json +1 -1
- package/script/cli.js +45 -37
- package/script/deno.d.ts +0 -1
- package/script/deno.js +1 -2
- package/script/src/contants.d.ts +2 -2
- package/script/src/contants.d.ts.map +1 -1
- package/script/src/contants.js +23 -13
- package/script/src/file.d.ts +2 -7
- package/script/src/file.d.ts.map +1 -1
- package/script/src/file.js +2 -114
- package/script/src/providers/anthropic.d.ts +6 -11
- package/script/src/providers/anthropic.d.ts.map +1 -1
- package/script/src/providers/anthropic.js +13 -107
- package/script/src/providers/gemini.d.ts +6 -11
- package/script/src/providers/gemini.d.ts.map +1 -1
- package/script/src/providers/gemini.js +12 -113
- package/script/src/providers/openai.d.ts +6 -11
- package/script/src/providers/openai.d.ts.map +1 -1
- package/script/src/providers/openai.js +9 -108
- package/script/src/translator.d.ts +8 -0
- package/script/src/translator.d.ts.map +1 -0
- package/script/src/translator.js +209 -0
- package/script/src/types.d.ts +28 -11
- package/script/src/types.d.ts.map +1 -1
- package/script/src/utilites.d.ts +0 -6
- package/script/src/utilites.d.ts.map +1 -1
- package/script/src/utilites.js +19 -136
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts +0 -23
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.js +0 -51
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common32.d.ts +0 -35
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common32.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common32.js +0 -192
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts +0 -35
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.js +0 -113
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts +0 -4
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.js +0 -13
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts +0 -9
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.js +0 -2
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_validate_binary_like.d.ts +0 -2
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_validate_binary_like.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_validate_binary_like.js +0 -26
- package/esm/deps/jsr.io/@std/encoding/1.0.10/ascii85.d.ts +0 -61
- package/esm/deps/jsr.io/@std/encoding/1.0.10/ascii85.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.10/ascii85.js +0 -152
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base32.d.ts +0 -40
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base32.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base32.js +0 -87
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base58.d.ts +0 -40
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base58.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base58.js +0 -131
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts +0 -40
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.js +0 -82
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base64url.d.ts +0 -40
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base64url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base64url.js +0 -72
- package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts +0 -39
- package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.js +0 -87
- package/esm/deps/jsr.io/@std/encoding/1.0.10/mod.d.ts +0 -98
- package/esm/deps/jsr.io/@std/encoding/1.0.10/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.10/mod.js +0 -99
- package/esm/deps/jsr.io/@std/encoding/1.0.10/varint.d.ts +0 -120
- package/esm/deps/jsr.io/@std/encoding/1.0.10/varint.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.10/varint.js +0 -205
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts +0 -23
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common16.js +0 -57
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common32.d.ts +0 -35
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common32.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common32.js +0 -198
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts +0 -35
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common64.js +0 -119
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts +0 -4
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common_detach.js +0 -16
- package/script/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts +0 -9
- package/script/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.10/_types.js +0 -3
- package/script/deps/jsr.io/@std/encoding/1.0.10/_validate_binary_like.d.ts +0 -2
- package/script/deps/jsr.io/@std/encoding/1.0.10/_validate_binary_like.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.10/_validate_binary_like.js +0 -29
- package/script/deps/jsr.io/@std/encoding/1.0.10/ascii85.d.ts +0 -61
- package/script/deps/jsr.io/@std/encoding/1.0.10/ascii85.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.10/ascii85.js +0 -156
- package/script/deps/jsr.io/@std/encoding/1.0.10/base32.d.ts +0 -40
- package/script/deps/jsr.io/@std/encoding/1.0.10/base32.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.10/base32.js +0 -91
- package/script/deps/jsr.io/@std/encoding/1.0.10/base58.d.ts +0 -40
- package/script/deps/jsr.io/@std/encoding/1.0.10/base58.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.10/base58.js +0 -135
- package/script/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts +0 -40
- package/script/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.10/base64.js +0 -86
- package/script/deps/jsr.io/@std/encoding/1.0.10/base64url.d.ts +0 -40
- package/script/deps/jsr.io/@std/encoding/1.0.10/base64url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.10/base64url.js +0 -76
- package/script/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts +0 -39
- package/script/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.10/hex.js +0 -91
- package/script/deps/jsr.io/@std/encoding/1.0.10/mod.d.ts +0 -98
- package/script/deps/jsr.io/@std/encoding/1.0.10/mod.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.10/mod.js +0 -115
- package/script/deps/jsr.io/@std/encoding/1.0.10/varint.d.ts +0 -120
- package/script/deps/jsr.io/@std/encoding/1.0.10/varint.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.10/varint.js +0 -211
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
-
export const alphabet = new TextEncoder().encode("0123456789abcdef");
|
|
3
|
-
export const rAlphabet = new Uint8Array(128).fill(16); // alphabet.Hex.length
|
|
4
|
-
alphabet.forEach((byte, i) => rAlphabet[byte] = i);
|
|
5
|
-
new TextEncoder()
|
|
6
|
-
.encode("ABCDEF")
|
|
7
|
-
.forEach((byte, i) => rAlphabet[byte] = i + 10);
|
|
8
|
-
/**
|
|
9
|
-
* Calculate the output size needed to encode a given input size for
|
|
10
|
-
* {@linkcode encodeIntoHex}.
|
|
11
|
-
*
|
|
12
|
-
* @param originalSize The size of the input buffer.
|
|
13
|
-
* @returns The size of the output buffer.
|
|
14
|
-
*
|
|
15
|
-
* @example Basic Usage
|
|
16
|
-
* ```ts
|
|
17
|
-
* import { assertEquals } from "@std/assert";
|
|
18
|
-
* import { calcSizeHex } from "@std/encoding/unstable-hex";
|
|
19
|
-
*
|
|
20
|
-
* assertEquals(calcSizeHex(1), 2);
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export function calcSizeHex(originalSize) {
|
|
24
|
-
return originalSize * 2;
|
|
25
|
-
}
|
|
26
|
-
export function encode(buffer, i, o, alphabet) {
|
|
27
|
-
for (; i < buffer.length; ++i) {
|
|
28
|
-
const x = buffer[i];
|
|
29
|
-
buffer[o++] = alphabet[x >> 4];
|
|
30
|
-
buffer[o++] = alphabet[x & 0xF];
|
|
31
|
-
}
|
|
32
|
-
return o;
|
|
33
|
-
}
|
|
34
|
-
export function decode(buffer, i, o, alphabet) {
|
|
35
|
-
if ((buffer.length - o) % 2 === 1) {
|
|
36
|
-
throw new RangeError(`Cannot decode input as hex: Length (${buffer.length - o}) must be divisible by 2`);
|
|
37
|
-
}
|
|
38
|
-
i += 1;
|
|
39
|
-
for (; i < buffer.length; i += 2) {
|
|
40
|
-
buffer[o++] = (getByte(buffer[i - 1], alphabet) << 4) |
|
|
41
|
-
getByte(buffer[i], alphabet);
|
|
42
|
-
}
|
|
43
|
-
return o;
|
|
44
|
-
}
|
|
45
|
-
function getByte(char, alphabet) {
|
|
46
|
-
const byte = alphabet[char] ?? 16;
|
|
47
|
-
if (byte === 16) { // alphabet.Hex.length
|
|
48
|
-
throw new TypeError(`Cannot decode input as hex: Invalid character (${String.fromCharCode(char)})`);
|
|
49
|
-
}
|
|
50
|
-
return byte;
|
|
51
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { Uint8Array_ } from "./_types.js";
|
|
2
|
-
export type { Uint8Array_ };
|
|
3
|
-
export declare const padding: number;
|
|
4
|
-
export declare const alphabet: Record<Base32Alphabet, Uint8Array>;
|
|
5
|
-
export declare const rAlphabet: Record<Base32Alphabet, Uint8Array>;
|
|
6
|
-
/**
|
|
7
|
-
* Options for encoding and decoding base32 strings.
|
|
8
|
-
*/
|
|
9
|
-
export interface Base32Options {
|
|
10
|
-
/** The base32 alphabet. Defaults to "base32" */
|
|
11
|
-
alphabet?: Base32Alphabet;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* The base32 alphabets.
|
|
15
|
-
*/
|
|
16
|
-
export type Base32Alphabet = "base32" | "base32hex" | "base32crockford";
|
|
17
|
-
/**
|
|
18
|
-
* Calculate the output size needed to encode a given input size for
|
|
19
|
-
* {@linkcode encodeIntoBase32}.
|
|
20
|
-
*
|
|
21
|
-
* @param rawSize The size of the input buffer.
|
|
22
|
-
* @returns The size of the output buffer.
|
|
23
|
-
*
|
|
24
|
-
* @example Basic Usage
|
|
25
|
-
* ```ts
|
|
26
|
-
* import { assertEquals } from "@std/assert";
|
|
27
|
-
* import { calcSizeBase32 } from "@std/encoding/unstable-base32";
|
|
28
|
-
*
|
|
29
|
-
* assertEquals(calcSizeBase32(1), 8);
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export declare function calcSizeBase32(rawSize: number): number;
|
|
33
|
-
export declare function encode(buffer: Uint8Array_, i: number, o: number, alphabet: Uint8Array, padding: number): number;
|
|
34
|
-
export declare function decode(buffer: Uint8Array_, i: number, o: number, alphabet: Uint8Array, padding: number): number;
|
|
35
|
-
//# sourceMappingURL=_common32.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_common32.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/encoding/1.0.10/_common32.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B,eAAO,MAAM,OAAO,QAAoB,CAAC;AACzC,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,cAAc,EAAE,UAAU,CAIvD,CAAC;AACF,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,cAAc,EAAE,UAAU,CAIxD,CAAC;AAQF;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,WAAW,GAAG,iBAAiB,CAAC;AAExE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,MAAM,CACpB,MAAM,EAAE,WAAW,EACnB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,MAAM,GACd,MAAM,CAmER;AAED,wBAAgB,MAAM,CACpB,MAAM,EAAE,WAAW,EACnB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,MAAM,GACd,MAAM,CAyFR"}
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
-
export const padding = "=".charCodeAt(0);
|
|
3
|
-
export const alphabet = {
|
|
4
|
-
base32: new TextEncoder().encode("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),
|
|
5
|
-
base32hex: new TextEncoder().encode("0123456789ABCDEFGHIJKLMNOPQRSTUV"),
|
|
6
|
-
base32crockford: new TextEncoder().encode("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),
|
|
7
|
-
};
|
|
8
|
-
export const rAlphabet = {
|
|
9
|
-
base32: new Uint8Array(128).fill(32), // alphabet.base32.length
|
|
10
|
-
base32hex: new Uint8Array(128).fill(32),
|
|
11
|
-
base32crockford: new Uint8Array(128).fill(32),
|
|
12
|
-
};
|
|
13
|
-
alphabet.base32
|
|
14
|
-
.forEach((byte, i) => rAlphabet.base32[byte] = i);
|
|
15
|
-
alphabet.base32hex
|
|
16
|
-
.forEach((byte, i) => rAlphabet.base32hex[byte] = i);
|
|
17
|
-
alphabet.base32crockford
|
|
18
|
-
.forEach((byte, i) => rAlphabet.base32crockford[byte] = i);
|
|
19
|
-
/**
|
|
20
|
-
* Calculate the output size needed to encode a given input size for
|
|
21
|
-
* {@linkcode encodeIntoBase32}.
|
|
22
|
-
*
|
|
23
|
-
* @param rawSize The size of the input buffer.
|
|
24
|
-
* @returns The size of the output buffer.
|
|
25
|
-
*
|
|
26
|
-
* @example Basic Usage
|
|
27
|
-
* ```ts
|
|
28
|
-
* import { assertEquals } from "@std/assert";
|
|
29
|
-
* import { calcSizeBase32 } from "@std/encoding/unstable-base32";
|
|
30
|
-
*
|
|
31
|
-
* assertEquals(calcSizeBase32(1), 8);
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export function calcSizeBase32(rawSize) {
|
|
35
|
-
return ((rawSize + 4) / 5 | 0) * 8;
|
|
36
|
-
}
|
|
37
|
-
export function encode(buffer, i, o, alphabet, padding) {
|
|
38
|
-
i += 4;
|
|
39
|
-
for (; i < buffer.length; i += 5) {
|
|
40
|
-
let x = (buffer[i - 4] << 16) | (buffer[i - 3] << 8) | buffer[i - 2];
|
|
41
|
-
buffer[o++] = alphabet[x >> 19];
|
|
42
|
-
buffer[o++] = alphabet[x >> 14 & 0x1F];
|
|
43
|
-
buffer[o++] = alphabet[x >> 9 & 0x1F];
|
|
44
|
-
buffer[o++] = alphabet[x >> 4 & 0x1F];
|
|
45
|
-
x = (x << 16) | (buffer[i - 1] << 8) | buffer[i];
|
|
46
|
-
buffer[o++] = alphabet[x >> 15 & 0x1F];
|
|
47
|
-
buffer[o++] = alphabet[x >> 10 & 0x1F];
|
|
48
|
-
buffer[o++] = alphabet[x >> 5 & 0x1F];
|
|
49
|
-
buffer[o++] = alphabet[x & 0x1F];
|
|
50
|
-
}
|
|
51
|
-
switch (i) {
|
|
52
|
-
case buffer.length + 3: {
|
|
53
|
-
const x = buffer[i - 4] << 16;
|
|
54
|
-
buffer[o++] = alphabet[x >> 19];
|
|
55
|
-
buffer[o++] = alphabet[x >> 14 & 0x1F];
|
|
56
|
-
buffer[o++] = padding;
|
|
57
|
-
buffer[o++] = padding;
|
|
58
|
-
buffer[o++] = padding;
|
|
59
|
-
buffer[o++] = padding;
|
|
60
|
-
buffer[o++] = padding;
|
|
61
|
-
buffer[o++] = padding;
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
case buffer.length + 2: {
|
|
65
|
-
const x = (buffer[i - 4] << 16) | (buffer[i - 3] << 8);
|
|
66
|
-
buffer[o++] = alphabet[x >> 19];
|
|
67
|
-
buffer[o++] = alphabet[x >> 14 & 0x1F];
|
|
68
|
-
buffer[o++] = alphabet[x >> 9 & 0x1F];
|
|
69
|
-
buffer[o++] = alphabet[x >> 4 & 0x1F];
|
|
70
|
-
buffer[o++] = padding;
|
|
71
|
-
buffer[o++] = padding;
|
|
72
|
-
buffer[o++] = padding;
|
|
73
|
-
buffer[o++] = padding;
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
case buffer.length + 1: {
|
|
77
|
-
let x = (buffer[i - 4] << 16) | (buffer[i - 3] << 8) | buffer[i - 2];
|
|
78
|
-
buffer[o++] = alphabet[x >> 19];
|
|
79
|
-
buffer[o++] = alphabet[x >> 14 & 0x1F];
|
|
80
|
-
buffer[o++] = alphabet[x >> 9 & 0x1F];
|
|
81
|
-
buffer[o++] = alphabet[x >> 4 & 0x1F];
|
|
82
|
-
x <<= 16;
|
|
83
|
-
buffer[o++] = alphabet[x >> 15 & 0x1F];
|
|
84
|
-
buffer[o++] = padding;
|
|
85
|
-
buffer[o++] = padding;
|
|
86
|
-
buffer[o++] = padding;
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
case buffer.length: {
|
|
90
|
-
let x = (buffer[i - 4] << 16) | (buffer[i - 3] << 8) | buffer[i - 2];
|
|
91
|
-
buffer[o++] = alphabet[x >> 19];
|
|
92
|
-
buffer[o++] = alphabet[x >> 14 & 0x1F];
|
|
93
|
-
buffer[o++] = alphabet[x >> 9 & 0x1F];
|
|
94
|
-
buffer[o++] = alphabet[x >> 4 & 0x1F];
|
|
95
|
-
x = (x << 16) | (buffer[i - 1] << 8);
|
|
96
|
-
buffer[o++] = alphabet[x >> 15 & 0x1F];
|
|
97
|
-
buffer[o++] = alphabet[x >> 10 & 0x1F];
|
|
98
|
-
buffer[o++] = alphabet[x >> 5 & 0x1F];
|
|
99
|
-
buffer[o++] = padding;
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return o;
|
|
104
|
-
}
|
|
105
|
-
export function decode(buffer, i, o, alphabet, padding) {
|
|
106
|
-
for (let x = buffer.length - 6; x < buffer.length; ++x) {
|
|
107
|
-
if (buffer[x] === padding) {
|
|
108
|
-
for (let y = x + 1; y < buffer.length; ++y) {
|
|
109
|
-
if (buffer[y] !== padding) {
|
|
110
|
-
throw new TypeError(`Cannot decode input as base32: Invalid character (${String.fromCharCode(buffer[y])})`);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
buffer = buffer.subarray(0, x);
|
|
114
|
-
break;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
switch ((buffer.length - o) % 8) {
|
|
118
|
-
case 6:
|
|
119
|
-
case 3:
|
|
120
|
-
case 1:
|
|
121
|
-
throw new RangeError(`Cannot decode input as base32: Length (${buffer.length - o}), excluding padding, must not have a remainder of 1, 3, or 6 when divided by 8`);
|
|
122
|
-
}
|
|
123
|
-
i += 7;
|
|
124
|
-
for (; i < buffer.length; i += 8) {
|
|
125
|
-
let x = (getByte(buffer[i - 7], alphabet) << 19) |
|
|
126
|
-
(getByte(buffer[i - 6], alphabet) << 14) |
|
|
127
|
-
(getByte(buffer[i - 5], alphabet) << 9) |
|
|
128
|
-
(getByte(buffer[i - 4], alphabet) << 4);
|
|
129
|
-
buffer[o++] = x >> 16;
|
|
130
|
-
buffer[o++] = x >> 8 & 0xFF;
|
|
131
|
-
x = (x << 16) |
|
|
132
|
-
(getByte(buffer[i - 3], alphabet) << 15) |
|
|
133
|
-
(getByte(buffer[i - 2], alphabet) << 10) |
|
|
134
|
-
(getByte(buffer[i - 1], alphabet) << 5) |
|
|
135
|
-
getByte(buffer[i], alphabet);
|
|
136
|
-
buffer[o++] = x >> 16 & 0xFF;
|
|
137
|
-
buffer[o++] = x >> 8 & 0xFF;
|
|
138
|
-
buffer[o++] = x & 0xFF;
|
|
139
|
-
}
|
|
140
|
-
switch (i) {
|
|
141
|
-
case buffer.length + 5: {
|
|
142
|
-
const x = (getByte(buffer[i - 7], alphabet) << 19) |
|
|
143
|
-
(getByte(buffer[i - 6], alphabet) << 14);
|
|
144
|
-
buffer[o++] = x >> 16;
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
147
|
-
case buffer.length + 3: {
|
|
148
|
-
const x = (getByte(buffer[i - 7], alphabet) << 19) |
|
|
149
|
-
(getByte(buffer[i - 6], alphabet) << 14) |
|
|
150
|
-
(getByte(buffer[i - 5], alphabet) << 9) |
|
|
151
|
-
(getByte(buffer[i - 4], alphabet) << 4);
|
|
152
|
-
buffer[o++] = x >> 16;
|
|
153
|
-
buffer[o++] = x >> 8 & 0xFF;
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
case buffer.length + 2: {
|
|
157
|
-
let x = (getByte(buffer[i - 7], alphabet) << 19) |
|
|
158
|
-
(getByte(buffer[i - 6], alphabet) << 14) |
|
|
159
|
-
(getByte(buffer[i - 5], alphabet) << 9) |
|
|
160
|
-
(getByte(buffer[i - 4], alphabet) << 4);
|
|
161
|
-
buffer[o++] = x >> 16;
|
|
162
|
-
buffer[o++] = x >> 8 & 0xFF;
|
|
163
|
-
x = (x << 16) |
|
|
164
|
-
(getByte(buffer[i - 3], alphabet) << 15);
|
|
165
|
-
buffer[o++] = x >> 16 & 0xFF;
|
|
166
|
-
break;
|
|
167
|
-
}
|
|
168
|
-
case buffer.length: {
|
|
169
|
-
let x = (getByte(buffer[i - 7], alphabet) << 19) |
|
|
170
|
-
(getByte(buffer[i - 6], alphabet) << 14) |
|
|
171
|
-
(getByte(buffer[i - 5], alphabet) << 9) |
|
|
172
|
-
(getByte(buffer[i - 4], alphabet) << 4);
|
|
173
|
-
buffer[o++] = x >> 16;
|
|
174
|
-
buffer[o++] = x >> 8 & 0xFF;
|
|
175
|
-
x = (x << 16) |
|
|
176
|
-
(getByte(buffer[i - 3], alphabet) << 15) |
|
|
177
|
-
(getByte(buffer[i - 2], alphabet) << 10) |
|
|
178
|
-
(getByte(buffer[i - 1], alphabet) << 5);
|
|
179
|
-
buffer[o++] = x >> 16 & 0xFF;
|
|
180
|
-
buffer[o++] = x >> 8 & 0xFF;
|
|
181
|
-
break;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
return o;
|
|
185
|
-
}
|
|
186
|
-
function getByte(char, alphabet) {
|
|
187
|
-
const byte = alphabet[char] ?? 32;
|
|
188
|
-
if (byte === 32) { // alphabet.Base32.length
|
|
189
|
-
throw new TypeError(`Cannot decode input as base32: Invalid character (${String.fromCharCode(char)})`);
|
|
190
|
-
}
|
|
191
|
-
return byte;
|
|
192
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { Uint8Array_ } from "./_types.js";
|
|
2
|
-
export type { Uint8Array_ };
|
|
3
|
-
export declare const padding: number;
|
|
4
|
-
export declare const alphabet: Record<Base64Alphabet, Uint8Array>;
|
|
5
|
-
export declare const rAlphabet: Record<Base64Alphabet, Uint8Array>;
|
|
6
|
-
/**
|
|
7
|
-
* Options for encoding and decoding base64 strings.
|
|
8
|
-
*/
|
|
9
|
-
export interface Base64Options {
|
|
10
|
-
/** The base64 alphabet. Defaults to "base64" */
|
|
11
|
-
alphabet?: Base64Alphabet;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* The base64 alphabets.
|
|
15
|
-
*/
|
|
16
|
-
export type Base64Alphabet = "base64" | "base64url";
|
|
17
|
-
/**
|
|
18
|
-
* Calculate the output size needed to encode a given input size for
|
|
19
|
-
* {@linkcode encodeIntoBase64}.
|
|
20
|
-
*
|
|
21
|
-
* @param originalSize The size of the input buffer.
|
|
22
|
-
* @returns The size of the output buffer.
|
|
23
|
-
*
|
|
24
|
-
* @example Basic Usage
|
|
25
|
-
* ```ts
|
|
26
|
-
* import { assertEquals } from "@std/assert";
|
|
27
|
-
* import { calcSizeBase64 } from "@std/encoding/unstable-base64";
|
|
28
|
-
*
|
|
29
|
-
* assertEquals(calcSizeBase64(1), 4);
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export declare function calcSizeBase64(originalSize: number): number;
|
|
33
|
-
export declare function encode(buffer: Uint8Array_, i: number, o: number, alphabet: Uint8Array, padding: number): number;
|
|
34
|
-
export declare function decode(buffer: Uint8Array_, i: number, o: number, alphabet: Uint8Array, padding: number): number;
|
|
35
|
-
//# sourceMappingURL=_common64.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_common64.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/encoding/1.0.10/_common64.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B,eAAO,MAAM,OAAO,QAAoB,CAAC;AACzC,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,cAAc,EAAE,UAAU,CAKvD,CAAC;AACF,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,cAAc,EAAE,UAAU,CAGxD,CAAC;AAMF;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEpD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,MAAM,CACpB,MAAM,EAAE,WAAW,EACnB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,MAAM,GACd,MAAM,CA4BR;AAED,wBAAgB,MAAM,CACpB,MAAM,EAAE,WAAW,EACnB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,MAAM,GACd,MAAM,CAmDR"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
-
export const padding = "=".charCodeAt(0);
|
|
3
|
-
export const alphabet = {
|
|
4
|
-
base64: new TextEncoder()
|
|
5
|
-
.encode("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),
|
|
6
|
-
base64url: new TextEncoder()
|
|
7
|
-
.encode("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),
|
|
8
|
-
};
|
|
9
|
-
export const rAlphabet = {
|
|
10
|
-
base64: new Uint8Array(128).fill(64), // alphabet.base64.length
|
|
11
|
-
base64url: new Uint8Array(128).fill(64),
|
|
12
|
-
};
|
|
13
|
-
alphabet.base64
|
|
14
|
-
.forEach((byte, i) => rAlphabet.base64[byte] = i);
|
|
15
|
-
alphabet.base64url
|
|
16
|
-
.forEach((byte, i) => rAlphabet.base64url[byte] = i);
|
|
17
|
-
/**
|
|
18
|
-
* Calculate the output size needed to encode a given input size for
|
|
19
|
-
* {@linkcode encodeIntoBase64}.
|
|
20
|
-
*
|
|
21
|
-
* @param originalSize The size of the input buffer.
|
|
22
|
-
* @returns The size of the output buffer.
|
|
23
|
-
*
|
|
24
|
-
* @example Basic Usage
|
|
25
|
-
* ```ts
|
|
26
|
-
* import { assertEquals } from "@std/assert";
|
|
27
|
-
* import { calcSizeBase64 } from "@std/encoding/unstable-base64";
|
|
28
|
-
*
|
|
29
|
-
* assertEquals(calcSizeBase64(1), 4);
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export function calcSizeBase64(originalSize) {
|
|
33
|
-
return ((originalSize + 2) / 3 | 0) * 4;
|
|
34
|
-
}
|
|
35
|
-
export function encode(buffer, i, o, alphabet, padding) {
|
|
36
|
-
i += 2;
|
|
37
|
-
for (; i < buffer.length; i += 3) {
|
|
38
|
-
const x = (buffer[i - 2] << 16) | (buffer[i - 1] << 8) | buffer[i];
|
|
39
|
-
buffer[o++] = alphabet[x >> 18];
|
|
40
|
-
buffer[o++] = alphabet[x >> 12 & 0x3F];
|
|
41
|
-
buffer[o++] = alphabet[x >> 6 & 0x3F];
|
|
42
|
-
buffer[o++] = alphabet[x & 0x3F];
|
|
43
|
-
}
|
|
44
|
-
switch (i) {
|
|
45
|
-
case buffer.length + 1: {
|
|
46
|
-
const x = buffer[i - 2] << 16;
|
|
47
|
-
buffer[o++] = alphabet[x >> 18];
|
|
48
|
-
buffer[o++] = alphabet[x >> 12 & 0x3F];
|
|
49
|
-
buffer[o++] = padding;
|
|
50
|
-
buffer[o++] = padding;
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
case buffer.length: {
|
|
54
|
-
const x = (buffer[i - 2] << 16) | (buffer[i - 1] << 8);
|
|
55
|
-
buffer[o++] = alphabet[x >> 18];
|
|
56
|
-
buffer[o++] = alphabet[x >> 12 & 0x3F];
|
|
57
|
-
buffer[o++] = alphabet[x >> 6 & 0x3F];
|
|
58
|
-
buffer[o++] = padding;
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return o;
|
|
63
|
-
}
|
|
64
|
-
export function decode(buffer, i, o, alphabet, padding) {
|
|
65
|
-
for (let x = buffer.length - 2; x < buffer.length; ++x) {
|
|
66
|
-
if (buffer[x] === padding) {
|
|
67
|
-
for (let y = x + 1; y < buffer.length; ++y) {
|
|
68
|
-
if (buffer[y] !== padding) {
|
|
69
|
-
throw new TypeError(`Cannot decode input as base64: Invalid character (${String.fromCharCode(buffer[y])})`);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
buffer = buffer.subarray(0, x);
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
if ((buffer.length - o) % 4 === 1) {
|
|
77
|
-
throw new RangeError(`Cannot decode input as base64: Length (${buffer.length - o}), excluding padding, must not have a remainder of 1 when divided by 4`);
|
|
78
|
-
}
|
|
79
|
-
i += 3;
|
|
80
|
-
for (; i < buffer.length; i += 4) {
|
|
81
|
-
const x = (getByte(buffer[i - 3], alphabet) << 18) |
|
|
82
|
-
(getByte(buffer[i - 2], alphabet) << 12) |
|
|
83
|
-
(getByte(buffer[i - 1], alphabet) << 6) |
|
|
84
|
-
getByte(buffer[i], alphabet);
|
|
85
|
-
buffer[o++] = x >> 16;
|
|
86
|
-
buffer[o++] = x >> 8 & 0xFF;
|
|
87
|
-
buffer[o++] = x & 0xFF;
|
|
88
|
-
}
|
|
89
|
-
switch (i) {
|
|
90
|
-
case buffer.length + 1: {
|
|
91
|
-
const x = (getByte(buffer[i - 3], alphabet) << 18) |
|
|
92
|
-
(getByte(buffer[i - 2], alphabet) << 12);
|
|
93
|
-
buffer[o++] = x >> 16;
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
case buffer.length: {
|
|
97
|
-
const x = (getByte(buffer[i - 3], alphabet) << 18) |
|
|
98
|
-
(getByte(buffer[i - 2], alphabet) << 12) |
|
|
99
|
-
(getByte(buffer[i - 1], alphabet) << 6);
|
|
100
|
-
buffer[o++] = x >> 16;
|
|
101
|
-
buffer[o++] = x >> 8 & 0xFF;
|
|
102
|
-
break;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return o;
|
|
106
|
-
}
|
|
107
|
-
function getByte(char, alphabet) {
|
|
108
|
-
const byte = alphabet[char] ?? 64;
|
|
109
|
-
if (byte === 64) { // alphabet.Base64.length
|
|
110
|
-
throw new TypeError(`Cannot decode input as base64: Invalid character (${String.fromCharCode(char)})`);
|
|
111
|
-
}
|
|
112
|
-
return byte;
|
|
113
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_common_detach.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/encoding/1.0.10/_common_detach.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B,wBAAgB,MAAM,CACpB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,MAAM,GACd,CAAC,WAAW,EAAE,MAAM,CAAC,CAWvB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
-
export function detach(buffer, maxSize) {
|
|
3
|
-
const originalSize = buffer.length;
|
|
4
|
-
if (buffer.byteOffset) {
|
|
5
|
-
const b = new Uint8Array(buffer.buffer);
|
|
6
|
-
b.set(buffer);
|
|
7
|
-
buffer = b.subarray(0, originalSize);
|
|
8
|
-
}
|
|
9
|
-
// deno-lint-ignore no-explicit-any
|
|
10
|
-
buffer = new Uint8Array(buffer.buffer.transfer(maxSize));
|
|
11
|
-
buffer.set(buffer.subarray(0, originalSize), maxSize - originalSize);
|
|
12
|
-
return [buffer, maxSize - originalSize];
|
|
13
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Proxy type of {@code Uint8Array<ArrayBuffer} or {@code Uint8Array} in TypeScript 5.7 or below respectively.
|
|
3
|
-
*
|
|
4
|
-
* This type is internal utility type and should not be used directly.
|
|
5
|
-
*
|
|
6
|
-
* @internal @private
|
|
7
|
-
*/
|
|
8
|
-
export type Uint8Array_ = ReturnType<Uint8Array["slice"]>;
|
|
9
|
-
//# sourceMappingURL=_types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/encoding/1.0.10/_types.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_validate_binary_like.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/encoding/1.0.10/_validate_binary_like.ts"],"names":[],"mappings":"AAeA,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAa9D"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
-
const encoder = new TextEncoder();
|
|
3
|
-
function getTypeName(value) {
|
|
4
|
-
const type = typeof value;
|
|
5
|
-
if (type !== "object") {
|
|
6
|
-
return type;
|
|
7
|
-
}
|
|
8
|
-
else if (value === null) {
|
|
9
|
-
return "null";
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
return value?.constructor?.name ?? "object";
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export function validateBinaryLike(source) {
|
|
16
|
-
if (typeof source === "string") {
|
|
17
|
-
return encoder.encode(source);
|
|
18
|
-
}
|
|
19
|
-
else if (source instanceof Uint8Array) {
|
|
20
|
-
return source;
|
|
21
|
-
}
|
|
22
|
-
else if (source instanceof ArrayBuffer) {
|
|
23
|
-
return new Uint8Array(source);
|
|
24
|
-
}
|
|
25
|
-
throw new TypeError(`Cannot validate the input as it must be a Uint8Array, a string, or an ArrayBuffer: received a value of the type ${getTypeName(source)}`);
|
|
26
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { Uint8Array_ } from "./_types.js";
|
|
2
|
-
export type { Uint8Array_ };
|
|
3
|
-
/**
|
|
4
|
-
* Supported ascii85 standards for {@linkcode EncodeAscii85Options} and
|
|
5
|
-
* {@linkcode DecodeAscii85Options}.
|
|
6
|
-
*/
|
|
7
|
-
export type Ascii85Standard = "Adobe" | "btoa" | "RFC 1924" | "Z85";
|
|
8
|
-
/** Options for {@linkcode encodeAscii85}. */
|
|
9
|
-
export interface EncodeAscii85Options {
|
|
10
|
-
/**
|
|
11
|
-
* Character set and delimiter (if supported and used).
|
|
12
|
-
*
|
|
13
|
-
* @default {"Adobe"}
|
|
14
|
-
*/
|
|
15
|
-
standard?: Ascii85Standard;
|
|
16
|
-
/**
|
|
17
|
-
* Whether to use a delimiter (if supported).
|
|
18
|
-
*
|
|
19
|
-
* @default {false}
|
|
20
|
-
*/
|
|
21
|
-
delimiter?: boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Converts data into an ascii85-encoded string.
|
|
25
|
-
*
|
|
26
|
-
* @param data The data to encode.
|
|
27
|
-
* @param options Options for encoding.
|
|
28
|
-
*
|
|
29
|
-
* @returns The ascii85-encoded string.
|
|
30
|
-
*
|
|
31
|
-
* @example Usage
|
|
32
|
-
* ```ts
|
|
33
|
-
* import { encodeAscii85 } from "@std/encoding/ascii85";
|
|
34
|
-
* import { assertEquals } from "@std/assert";
|
|
35
|
-
*
|
|
36
|
-
* assertEquals(encodeAscii85("Hello world!"), "87cURD]j7BEbo80");
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
export declare function encodeAscii85(data: ArrayBuffer | Uint8Array | string, options?: EncodeAscii85Options): string;
|
|
40
|
-
/** Options for {@linkcode decodeAscii85}. */
|
|
41
|
-
export type DecodeAscii85Options = Omit<EncodeAscii85Options, "delimiter">;
|
|
42
|
-
/**
|
|
43
|
-
* Decodes a ascii85-encoded string.
|
|
44
|
-
*
|
|
45
|
-
* @param ascii85 The ascii85-encoded string to decode.
|
|
46
|
-
* @param options Options for decoding.
|
|
47
|
-
* @returns The decoded data.
|
|
48
|
-
*
|
|
49
|
-
* @example Usage
|
|
50
|
-
* ```ts
|
|
51
|
-
* import { decodeAscii85 } from "@std/encoding/ascii85";
|
|
52
|
-
* import { assertEquals } from "@std/assert";
|
|
53
|
-
*
|
|
54
|
-
* assertEquals(
|
|
55
|
-
* decodeAscii85("87cURD]j7BEbo80"),
|
|
56
|
-
* new TextEncoder().encode("Hello world!"),
|
|
57
|
-
* );
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
export declare function decodeAscii85(ascii85: string, options?: DecodeAscii85Options): Uint8Array_;
|
|
61
|
-
//# sourceMappingURL=ascii85.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ascii85.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/encoding/1.0.10/ascii85.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,YAAY,EAAE,WAAW,EAAE,CAAC;AAwB5B;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,KAAK,CAAC;AAEpE,6CAA6C;AAC7C,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAOD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,WAAW,GAAG,UAAU,GAAG,MAAM,EACvC,OAAO,GAAE,oBAAyB,GACjC,MAAM,CA6DR;AAED,6CAA6C;AAC7C,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC;AAE3E;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,oBAAyB,GACjC,WAAW,CA4Cb"}
|