d_bincode 3.2.0
d_bincode: ^3.2.0 copied to clipboard
A performant Dart implementation of the Bincode binary serialization format. Requires manual implementation for encoding/decoding custom types.
1.0.0 #
- Initial version.
1.0.1 #
- Added nested objects/classes support - writeNested, writeOptionalNested, readNestedObject, readOptionalNestedObject.
toBincode()/fromBincode()API inherit from BincodeEncodable / BincodeDecodable.- Added error handling and validation.
- Removed
DebuggableandFluentAPIs. - Added benchmarks (speed & size) vs JSON example.
- Improved documentation and fixed lints for pub.flutter-io.cn compliance.
2.0.0 #
Breaking Changes #
- Removed
lengthparameter fromread*Listmethods (now reads length prefix). Update calls by removing the argument. - Renamed
loadFromBytestofromBincode.
Added #
- Optional
unsafe/uncheckedflags forBincodeReader/BincodeWriterto bypass checks for performance. - New
readNestedObjectForFixedandreadOptionNestedObjectForFixedmethods for fixed-size object reading. readRawBytes(int length)method.
Deprecated #
readNestedObject/readOptionNestedObject. UseForCollectionorForFixedvariants instead.
Removed #
- Internal implementation classes (
Builder,Wrapper,Exception) from public API.
3.0.0 #
Breaking Changes #
- BincodeEncodable & BincodeDecodable use now encode(BincodeReader reader) and decode(BincodeWriter writer) - from and toBincode are removed.
Added #
- More static methods for BincodeWriter and BincodeReader
- Improved performance by alot by removing Wrapper overheat and overall impls of the methods
- More methods for BincodeWriter and BincodeReader for manual buffer modifications
Removed #
- ByteDataWrapper removed to increase performance
- String Encode and Decode Method's and Enums removed - only utf8/ASCII Supported
- Less Exceptions and checks
- euc dependency got removed
3.1.0 #
Added #
- Support for serializing/deserializing Dart
String(single character) as Rustchar(viau32rune - Bincode v1/legacy compatible) usingwriteChar/readCharandwriteOptionChar/readOptionChar. - Support for fixed-size arrays (Rust
[T; N]) viawriteFixedArray/readFixedArray, which serialize elements sequentially without a length prefix. - Support for
Set<T>viawriteSet/readSet, serializing likeVec<T>(u64 length prefix + elements). - Support for Rust-style enum discriminants (variant index) via
writeEnumDiscriminant/readEnumDiscriminant(usingu32) andwriteOptionEnumDiscriminant/readOptionEnumDiscriminant. - Support for
DurationviawriteDuration/readDurationandwriteOptionDuration/readOptionDuration, using a format compatible with Rust'schrono::Duration(i64 seconds + u32 nanos).
3.2.0 #
Added #
BitMaskUtility: Added class for managing 8 boolean flags packed into a single byte (u8). (Note: Bincode sends/receives the underlyingu8;BitMaskhelps interpret it.)BincodeWriterPool: Added class for reusingBincodeWriterinstances to optimize performance and work with isolates etc.- Known Size Methods: Added
read/write...WithKnownSizeandread/writeOption...WithKnownSizemethods for explicit size handling and validation of fixed-size objects. Improves Read performance.
Deprecated #
BincodeWriter.measureFixedSize: Superseded by internal reader caching and...WithKnownSizemethods. Slated for future removal.
Changed #
- Updated library documentation and README to cover
BitMask,Pool, andKnownSizemethods/conventions.