vigna / dsi-bitstream-rs

A Rust implementation of read/write bit streams supporting several types of instantaneous codes
Apache License 2.0
7 stars 3 forks source link

Serde support #10

Open LucaCappelletti94 opened 3 weeks ago

LucaCappelletti94 commented 3 weeks ago

Hi! I am running CodesStats to identify which Code may be better for my use case (gaps in a sorted hash list).

I noticed that serde is wholly unsupported, and I would like to have the possibility to dump the Codes obtained by the analysis since I need to run several possible parameterizations. Is there any reason for the lack of serde? Otherwise, I can add that with a pull request.

vigna commented 3 weeks ago

No particular reason. It seems a good idea, maybe with a non-default gate feature.

vigna commented 3 weeks ago

No particular reason. It seems a good idea, maybe with a non-default gate feature.

LucaCappelletti94 commented 3 weeks ago

Ok, then I got the ball rolling in #11

LucaCappelletti94 commented 3 weeks ago

I was not aware of this, but apparently, for what entails serialization to a CSV: calledResult::unwrap()on anErrvalue: Error(Serialize("serializing enum struct variants is not supported")). I suppose that requires some more specific definitions.