Lossless Uncompressed Serializer Library
lusl is a library that serializes a directory containing multiple files into a single file and also deserializes it, like a tarball.
Features
- Serialize a directory that contains multiple files.
- Deserialize serialized file and restore to a directory.
- Save and verify MD5 checksum of files for data integrity.
- Provides a way to encrypt and compress the serialized file.
The encryption is done using XChaCha20-Poly1305 and the compression is done using zlib.
File Structure
See documents.
Usage
Serializing and deserializing without encrypting or compressing.
use ;
use PathBuf;
// Serialize a directory into a file.
let original = from;
let result = from;
let mut serializer = new.unwrap;
serializer.serialize.unwrap;
// Deserialize the file into a directory.
let restored = from;
let mut deserializer = new.unwrap;
deserializer.deserialize.unwrap;
assert!;
assert!;
Serializing and deserializing with encrypting and compressing.
use ;
use PathBuf;
// Serialize a directory into a file.
let original = from;
let result = from;
let mut serializer = new.unwrap;
// Set the encryption key and compression option.
serializer.set_option;
serializer.serialize.unwrap;
// Deserialize the file into a directory.
let restored = from;
let mut deserializer = new.unwrap;
// Set the encryption key and compression option.
deserializer.set_option;
deserializer.deserialize.unwrap;
assert!;
assert!;