mneumann / rust-msgpack

[DEPRECATED] msgpack.org implementation for Rust language. Please use https://github.com/3Hren/msgpack-rust
122 stars 31 forks source link

Differentiate between [u8] and binary. #12

Open mneumann opened 10 years ago

mneumann commented 10 years ago

[u8] will be encoded as arrays of integers, which is not very efficient as every byte potentially needs two bytes. It would be better to encode it as a msgpack binary (when supported). But with the current Decodable trait this seems to be not possible as we cannot specialize code for a specific element type.

A solution is to introduce a type binary = [u8].