Skip to content
pubscout

messagepack

0.2.1, released 6 years ago by an unverified publisher

Streaming API for MessagePack binary serialization in Dart.

WASM-ready
$ flutter pub add messagepack
Source repository

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.

Works with

Packages commonly used together with messagepack: ones it builds on, ones built on it, and its own family.