messagepack
0.2.1, released 6 years ago by an unverified publisher
Streaming API for MessagePack binary serialization in Dart.
What it does
Provides Packer and Unpacker classes to pack and unpack data using the MessagePack format. Supports automatic unpacking of lists and maps via a streaming interface.
AI-written summary of version 0.2.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- Need efficient binary serialization for custom protocols
- Cross‑platform apps requiring MessagePack support
Skip it when
- Prefer JSON or other text formats
- Require code‑generated models or schema validation
Strengths
- Zero external dependencies
- Works on all major Flutter platforms
- Streaming API allows incremental processing
Weaknesses
- Manual packing can be error‑prone
- Only supports MessagePack, no other formats
- No code‑generation or schema tools
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:messagepack/messagepack.dart';
final p = Packer();
p.packInt(1);
p.packString('hi');
final bytes = p.takeBytes();
final u = Unpacker(bytes);
final version = u.unpackInt();
final message = u.unpackString();Alternatives
Packages that do the same job and could replace messagepack.
- yaml
A Dart library for parsing YAML documents into Dart data structures.
92Compare - message_pack_dart
Binary MessagePack serializer/deserializer for Dart and Flutter.
48Compare - standard_message_codec
Binary codec for efficient encoding/decoding of Dart objects without a schema.
80Compare - plist_parser
Flutter plugin for parsing XML and binary Apple property list (plist) formats.
65Compare
Works with
Packages commonly used together with messagepack: ones it builds on, ones built on it, and its own family.