I was curious to see if rkyv can produce sort of a zip annotated with metadata.
Currently the metadata and internal .zip
are serialized / deserialized manually, allowing:
- ✅ zero-copy deserialization
- ✅ preserve internal zip
Experiments with current rkyv 0.7.42
helpers:
- ❌ if
Vec<u8>
is defined in struct, then it's somehow loaded, slowing everything down (even when removingvalidation
). - ❌ using
#[With(Raw)]
allows for expected efficient loading, but it serialize/deserialize the internal.zip
as a pointer (pointing to nothing).
A potential idiomatic solution would be to implement a custom #[With(Blob)]
to handle this specific use-case.
Please place some archive.zip
at the root of the repo to test it out (the bigger the .zip
the better).
Then, if you have Just
installed, run the alias:
just t
otherwise just run:
cargo t -- --test-threads 1 --nocapture