The Rust Implementation of Stellar Notation, an data encoding and serialization library.
```
stellar-notation = "0.9.8"
```
```
use stellarnotation::{ bytedecode, byteencode, valuedecode, value_encode }
```
An Object is a Key-Value Tuple. Keys and Values are UTF-8 Strings.
```
let key: String = String::from("key_1");
let value: String = String::from("value_1");
let object: Vec
```
| Value | Size(bytes) | |---|---| | Key Length | 1 | | Value Length | 8 | | Key Data | max 255 | | Value Data | max ~18.45 |
| Key len | Value len | Key Data | Value Data | |---|---|---|---| | 1 byte | 8 bytes | max 255 bytes | max ~18.45 exabytes |
Value data is also limited by the system file size limit.
Reconverts bytes into a Two String Tuple.
```
let keyvalue: (String, String) = bytedecode::object(serialized);
```
Converts a group of Two String Tuples into bytes.
```
let objects: Vec<(String, String)> = vec![ object1, object2, object3 ]
let group: Vec
```
| Group | | --- | | Obj1, Obj2 ... Obj(n) |
Reconverts bytes into a group of two string tuples.
```
let keyvaluegroup: Vec<(String, String)> = byte_decode::group(group);
```