kasten-js 0.2.0 → 0.2.1
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 +18 -2
- package/dist/index.d.ts +5 -3
- package/package.json +13 -2
package/README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
# Kasten
|
|
1
|
+
# Kasten
|
|
2
|
+
|
|
3
|
+
TypeScript Toolbox of Codecs and Cryptographies.
|
|
2
4
|
|
|
3
5
|
## Features
|
|
4
6
|
|
|
5
7
|
- Base 64 Encoding/Decoding
|
|
6
8
|
- RFC2045
|
|
7
9
|
- RFC4648
|
|
10
|
+
- RFC4648 (URL)
|
|
8
11
|
- Base 32 Encoding/Decoding
|
|
9
12
|
- RFC4648
|
|
10
13
|
- RFC4648 (Hex)
|
|
@@ -31,6 +34,19 @@ const encoded: string = base64.encode(data);
|
|
|
31
34
|
const decoded: Uint8Array = base64.decode(encoded);
|
|
32
35
|
```
|
|
33
36
|
|
|
34
|
-
|
|
37
|
+
All codecs available in Kasten are below.
|
|
38
|
+
|
|
39
|
+
|Group|Spec|Method|Category|Summary|
|
|
40
|
+
|:-|:-|:-|:-|:-|
|
|
41
|
+
|Base 64|RFC2045|`base64`|`rfc2045`|The old Base 64 specification.|
|
|
42
|
+
|Base 64|RFC4648|`base64`|`rfc4648`|The latest Base 64 specification.|
|
|
43
|
+
|Base 64|RFC4648(URL)|`base64`|`rfc4648-url`|The latest Base 64 specification for URL safe encoding.|
|
|
44
|
+
|Base 32|RFC4648|`base32`|`rfc4648`|The latest Base 32 specification.|
|
|
45
|
+
|Base 32|RFC4648 (HEX)|`base32`|`rfc4648-hex`|The latest Base 32 specification for hexadecimal encoding.|
|
|
46
|
+
|Base 16|RFC4648|`base16`|`rfc4648`|The latest Base 16 specification.|
|
|
47
|
+
|Run-Length|Basic|`runLength`|`basic`|The basic and old Run-Length encoding.|
|
|
48
|
+
|Run-Length|Basic|`runLength`|`pack-bits`|The old Run-Length encoding of Apple.|
|
|
49
|
+
|
|
50
|
+
## License
|
|
35
51
|
|
|
36
52
|
This project is licensed under the MIT License.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
//#region src/base16/index.d.ts
|
|
2
|
+
declare const Base16Categories: readonly ["rfc4648"];
|
|
3
|
+
type Base16Category = typeof Base16Categories[number];
|
|
2
4
|
declare abstract class Base16 {
|
|
3
5
|
/**
|
|
4
6
|
* Encodes bytes to Base16 string.
|
|
@@ -14,7 +16,7 @@ declare abstract class Base16 {
|
|
|
14
16
|
//#endregion
|
|
15
17
|
//#region src/base32/index.d.ts
|
|
16
18
|
type Base32Category = typeof Base32Categories[number];
|
|
17
|
-
declare const Base32Categories: readonly ["
|
|
19
|
+
declare const Base32Categories: readonly ["rfc4648", "rfc468-hex"];
|
|
18
20
|
declare abstract class Base32 {
|
|
19
21
|
protected static readonly textDecoder: TextDecoder;
|
|
20
22
|
/**
|
|
@@ -100,11 +102,11 @@ declare class Kasten {
|
|
|
100
102
|
/**
|
|
101
103
|
* Create Base 16 codec instance.
|
|
102
104
|
*/
|
|
103
|
-
static base16: () => Base16;
|
|
105
|
+
static base16: (category?: Base16Category) => Base16;
|
|
104
106
|
/**
|
|
105
107
|
* Creates Run-Length codec instance.
|
|
106
108
|
*/
|
|
107
109
|
static runLength: (category?: RunLengthCatgory) => RunLength;
|
|
108
110
|
}
|
|
109
111
|
//#endregion
|
|
110
|
-
export { type Base16, type Base32, type Base32Category, type Base64, type Base64Catgory, type Kasten, type RunLength, type RunLengthCatgory };
|
|
112
|
+
export { type Base16, type Base16Category, type Base32, type Base32Category, type Base64, type Base64Catgory, type Kasten, type RunLength, type RunLengthCatgory };
|
package/package.json
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kasten-js",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "TypeScript Toolbox of Codecs and Cryptgraphies",
|
|
5
|
-
"keywords": [
|
|
5
|
+
"keywords": [
|
|
6
|
+
"codec",
|
|
7
|
+
"encoding",
|
|
8
|
+
"decoding",
|
|
9
|
+
"encode",
|
|
10
|
+
"decode",
|
|
11
|
+
"base64",
|
|
12
|
+
"base32",
|
|
13
|
+
"base16",
|
|
14
|
+
"run-length",
|
|
15
|
+
"rle"
|
|
16
|
+
],
|
|
6
17
|
"author": "kkatou7209@gmail.com",
|
|
7
18
|
"type": "module",
|
|
8
19
|
"license": "MIT",
|