Cydhra / vers

Succinct data structures using very efficient rank and select
Apache License 2.0
62 stars 4 forks source link

Zerocopy RsVec #14

Open somethingelseentirely opened 2 months ago

somethingelseentirely commented 2 months ago

This adds a zerocopy capabilities based on the anybytes crate.

Cydhra commented 2 months ago

That could probably use a forced rebase

somethingelseentirely commented 2 months ago

Sorry, completely forgot to clean it up after all the other changes happened 🙇‍♂️ 😅 (The failing tests in the CI are because of the serde/zerocopy incompability.)

Cydhra commented 2 months ago

No, PackedSlice doesn't implement Index and has no len() method, thats why the tests fail

somethingelseentirely commented 2 months ago

I think that's a follow-up error, unless I'm missing something. PackedSlice implements

impl<T> AsRef<[T]> for PackedSlice<T>
where
    T: FromBytes,

but with the serde feature enabled, FromBytes and AsBytes don't get derived, so the blanket implementation won't exist, so it doesn't have Index or len().