Expand description
BEVE - Binary Efficient Versatile Encoding
High-performance, tagged binary format designed for scientific computing. This crate provides a robust, fast, and ergonomic implementation with serde support.
- Little-endian encoding
- Direct struct serialization via
serde::{Serialize, Deserialize}
- Typed arrays for numeric, boolean, and string sequences when possible
- Object keys as strings or integer types
- Enum support via BEVE type-tag extension
Example
use serde::{Serialize, Deserialize};
#[derive(Serialize, Deserialize, Debug, PartialEq)]
struct Point { x: f64, y: f64 }
let p = Point { x: 1.0, y: -2.0 };
let bytes = beve::to_vec(&p).unwrap();
let p2: Point = beve::from_slice(&bytes).unwrap();
assert_eq!(p, p2);
Re-exports§
pub use crate::fast::to_vec_bool_slice;
pub use crate::fast::to_vec_complex32;
pub use crate::fast::to_vec_complex32_slice;
pub use crate::fast::to_vec_complex64;
pub use crate::fast::to_vec_complex64_slice;
pub use crate::fast::to_vec_str_slice;
pub use crate::fast::to_vec_string_slice;
pub use crate::fast::to_vec_typed_slice;
pub use crate::fast::write_bool_slice;
pub use crate::fast::write_str_slice;
pub use crate::fast::write_string_slice;
pub use crate::fast::write_typed_slice;
pub use crate::fast::BeveTypedSlice;
Modules§
Structs§
Enums§
Functions§
- from_
reader - Deserialize a value by reading all bytes from a reader into a buffer first.
- from_
slice - to_vec
- to_
vec_ with_ options - to_
writer - Serialize a value to any writer. For unknown-length containers, this uses an internal buffer.
- to_
writer_ with_ options - Serialize a value to any writer with custom options.