Primitive Archiver
It structures data in a repeating sequence for each stored file
- Filename length (2 bytes)
- Filename bytes — Maximum of 65,535 bytes.
- Content length (after compression, 4 bytes)
- Content bytes (after compression) — Maximum of 4,294,967,295 bytes.
This format allows multiple files to be stored sequentially, even with identical filenames.
Example
use ;
async
- The
putmethod (sync) adds file data to an internal buffer. - The
endmethod (async) finalizes the archive by compressing and appending data to the internal BytesMut buffer. - The Unarchiver reads and extracts stored files asynchronously.
Future Improvements
- Support for additional compression algorithms
- Support for
Resultinstead of silently discarding files