flavray / avro-rs

Avro client library implementation in Rust
MIT License
169 stars 95 forks source link

Question regarding unsigned integer support and codec part #158

Open MSNTCS opened 3 years ago

MSNTCS commented 3 years ago

Greetings! Thank you for your great repository.

I have a few questions regarding your repository. I would appreciate it if you could answer them.

1- I was trying to use your library and Avro for unsigned integers. Since unsigned integers are Serializable and Deserializable, based on types the library supports, I should be able to use it. but I could not find a way to use unsigned integers or other serde-compatible types in your document. Can you please give me so information in this regard?

2- In my case, I am going to compress and store different values with the same schema over time. Is there any efficient way to compress values for the same schema?

Thank you

poros commented 3 years ago

Hello!

  1. The library supports all the types in the avro spec and they have been mapped to many of the most common Rust types. If you are trying to serialise a type who hasn't been supported yet, you can either convert it to a type already supported first (https://github.com/flavray/avro-rs/blob/master/src/types.rs#L113) or open a PR to add support for them.

  2. The library supports the Deflate and Snappy codecs for compression. You can see how to use them on the docs https://docs.rs/avro-rs/0.11.0/avro_rs/

MSNTCS commented 3 years ago

Thank you for your reply, I will try to use your suggestions :)