message_pack_dart
2.0.1, released 4 years ago by an unverified publisher
Binary MessagePack serializer/deserializer for Dart and Flutter.
WASM-ready
What it does
Provides functions to encode Dart objects to MessagePack binary format and decode MessagePack data back to Dart objects. Supports common types, iterables, ByteData, and returns Uint8List.
AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need compact binary serialization for network or storage
- Cross‑language data exchange with other MessagePack implementations
Skip it when
- You require JSON‑style human readable data
- You need schema‑based validation or code‑generated models
Strengths
- Very small payload size
- Fast binary encoding/decoding
- No external dependencies
Weaknesses
- Limited to MessagePack format only
- No code‑gen for typed models
- No built‑in schema validation
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:message_pack_dart/message_pack_dart.dart';
void main() {
var data = {'key': 'value', 'list': [1, 2, 3]};
Uint8List packed = MessagePack.encode(data);
var unpacked = MessagePack.decode(packed);
print(unpacked);
}Alternatives
Packages that do the same job and could replace message_pack_dart.
- built_value
Provides typed, immutable models with code‑gen and can serialize to JSON or binary formats
88Compare - json_annotation
Standard JSON serialization with code‑gen, easier for human‑readable data
84Compare
Works with
Packages commonly used together with message_pack_dart: ones it builds on, ones built on it, and its own family.