1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/*!
**`basexx`** is a Rust library that provides multiple base encoding and decoding functionalities.
### Core Features:
* **Base Encodings:** The library supports the following base encodings:
* Base32
* Base32I (integer-based)
* Base56
* Base58
* Base58B (Bitcoin-style)
* Base58R (Rug-based)
* Base64
* Base64G (with padding)
* **SIMD Acceleration:** The library leverages SIMD instructions (SSSE3 and AVX2) for improved performance on compatible x86/x86_64 architectures.
* **Custom Character Maps:** Users can provide their own character maps for each encoding, allowing for customized implementations.
* **Error Handling:** The library defines `EncodeError` and `DecodeError` enums to handle potential errors during the encoding and decoding processes.
### Modules:
* **`ags`:** This module provides the `AsciiGraphicSet` struct, which is used to manage the character sets for the various base encodings. It includes functions for converting between binary and ASCII representations, with SIMD-accelerated versions for improved performance.
* **`base32`:** This module implements the Base32 encoding and decoding functionality.
* **`base32i`:** This module provides an integer-based implementation of Base32, utilizing the `num-bigint` crate.
* **`base56`:** This module implements the Base56 encoding and decoding functionality.
* **`base58`:** This module implements the Base58 encoding and decoding functionality.
* **`base58b`:** This module provides a Bitcoin-style implementation of Base58.
* **`base58r`:** This module offers a `rug`-based implementation of Base58 for arbitrary-precision arithmetic.
* **`base64`:** This module implements the Base64 encoding and decoding functionality.
* **`base64g`:** This module provides a Base64 implementation with padding.
### Usage:
Each base encoding is exposed as a struct (e.g., `Base32`, `Base64`) that can be instantiated with a default or custom character map. The `encode` and `decode` methods can then be used to perform the respective operations.
**Example:**
```rust
use basexx::Base64;
let data = b"Hello, world!";
let base64 = Base64::new();
let encoded = base64.encode(data).unwrap();
println!("Encoded: {}", encoded);
let decoded = base64.decode(&encoded).unwrap();
assert_eq!(data, &decoded[..]);
```
*/
use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;