parity-scale-codec
Lightweight, efficient, binary serialization and deserialization codec (by paritytech)
speedy
A fast binary serialization framework (by koute)
parity-scale-codec | speedy | |
---|---|---|
2 | 1 | |
242 | 333 | |
2.9% | - | |
8.4 | 5.9 | |
6 days ago | 3 months ago | |
Rust | Rust | |
Apache License 2.0 | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
parity-scale-codec
Posts with mentions or reviews of parity-scale-codec.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-01-12.
-
Are there any serialization crates that do Varint encoding without Zigzag encoding?
https://github.com/paritytech/parity-scale-codec SCALE is used for blockchain stuff but could be useful for your use case. Is very Rust centric but still usable in other languages(like JS). It comes with a "compact encoding" feature that is used mostly for unsigned integers of variable size. And with https://github.com/paritytech/scale-info you can generate type registries/schemas that can be serialized in SCALE it self(or JSON or anything) in case you have clients that don't know the structure of the binary data.
-
How to serialize a struct into a network-endian byte buffer?
May be SCALE can help you?
speedy
Posts with mentions or reviews of speedy.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-01-12.
-
Are there any serialization crates that do Varint encoding without Zigzag encoding?
I would look at speedy which is, as the name suggests, pretty fast. It encodes varints in a way that's different from LEB128, and is much quicker to both encode and decode. The format they use is at the top of this file -- you can do it just with a couple of shifts and masks, and decoding is similarly fast. Speedy also hard-branches in the code with a switch statement based on how many bytes you need, which in my tests is something like 2x faster than the alternative, despite it being a branch (it's just turns into a lookup table in assembly).
What are some alternatives?
When comparing parity-scale-codec and speedy you can also consider the following projects:
scale-info - Info about SCALE encodable Rust types
postcard - A no_std + serde compatible message library for Rust
ssh_format - Data format used to communicate with openssh mux server.
serde - Serialization framework for Rust
pguint - unsigned integer types extension for PostgreSQL