1 stable release
1.0.0 | Aug 8, 2024 |
---|
#1158 in Parser implementations
11KB
115 lines
serde-intern
A Serde addon that allows interning of strings and byte
sequences behind Arc
s during deserialization.
Serde comes with an "rc"
feature flag
already.
However:
Deserializing a data structure containing reference-counted pointers will not attempt to deduplicate references to the same data. Every deserialized pointer will end up with a strong count of 1.
Unlike the stock Rc
/ Arc
deserialization available in the main Serde crate,
these custom deserializer functions will find duplicate values and
instead of wrapping each of them into an individual Arc
it will reuse
the existing arcs.
See API documentation for more information.
License
Licensed under either of BSD-2-Clause Plus Patent License, or Apache License, Version 2.0, or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in serde-intern
by you, as defined in the Apache-2.0 license,
shall be multi-licensed as above, without any additional terms or conditions.
Dependencies
~125–360KB