xref: /aosp_15_r20/external/flatbuffers/rust/flexbuffers/README.md (revision 890232f25432b36107d06881e0a25aaa6b473652)
1*890232f2SAndroid Build Coastguard Worker# Flexbuffers
2*890232f2SAndroid Build Coastguard Worker
3*890232f2SAndroid Build Coastguard Worker[Flexbuffers](https://google.github.io/flatbuffers/flexbuffers.html) is a
4*890232f2SAndroid Build Coastguard Workerschema-less binary format developed at Google. FlexBuffers can be accessed
5*890232f2SAndroid Build Coastguard Workerwithout parsing, copying, or allocation. This is a huge win for efficiency,
6*890232f2SAndroid Build Coastguard Workermemory friendly-ness, and allows for unique use cases such as mmap-ing large
7*890232f2SAndroid Build Coastguard Workeramounts of free-form data.
8*890232f2SAndroid Build Coastguard Worker
9*890232f2SAndroid Build Coastguard WorkerFlexBuffers' design and implementation allows for a very compact encoding,
10*890232f2SAndroid Build Coastguard Workerwith automatic sizing of containers to their smallest possible representation
11*890232f2SAndroid Build Coastguard Worker(8/16/32/64 bits). Many values and offsets can be encoded in just 8 bits.
12*890232f2SAndroid Build Coastguard Worker
13*890232f2SAndroid Build Coastguard WorkerFlexBuffers supports [Serde](https://serde.rs/) for automatically serializing
14*890232f2SAndroid Build Coastguard WorkerRust data structures into its binary format.
15*890232f2SAndroid Build Coastguard Worker
16*890232f2SAndroid Build Coastguard Worker## See Examples for Usage:
17*890232f2SAndroid Build Coastguard Worker* [Example](https://github.com/google/flatbuffers/blob/master/samples/sample_flexbuffers.rs)
18*890232f2SAndroid Build Coastguard Worker* [Serde Example](https://github.com/google/flatbuffers/blob/master/samples/sample_flexbuffers_serde.rs)
19*890232f2SAndroid Build Coastguard Worker* [Documentation](https://docs.rs/flexbuffers)
20*890232f2SAndroid Build Coastguard Worker
21*890232f2SAndroid Build Coastguard WorkerFlexbuffers is the schema-less cousin of
22*890232f2SAndroid Build Coastguard Worker[Flatbuffers](https://google.github.io/flatbuffers/).
23