Commit 3663e0d
authored
feat: add MessagePack reader/writer (#56)
Implements MessagePack binary format support using rmpv:
- Parser: from_bytes/from_reader for binary input, from_str for hex
- Writer: to_bytes for binary output, to_string as hex for CLI pipeline
- All primitive types round-trip: null, bool, int, float, string, bytes
- Nested structures (maps, arrays) fully preserved with key order
- Binary data (Bytes variant) natively preserved
- Cross-format round-trip: MessagePack → JSON → MessagePack
- CLI integration: -f msgpack/-t msgpack, .msgpack/.mp extensions
- 30+ tests covering round-trips, edge cases, errors, hex encoding
Fixes #271 parent 46fe72c commit 3663e0d
4 files changed
+562
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| 61 | + | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| |||
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| 76 | + | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
| |||
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
| 204 | + | |
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
| |||
218 | 224 | | |
219 | 225 | | |
220 | 226 | | |
| 227 | + | |
221 | 228 | | |
222 | 229 | | |
223 | 230 | | |
| |||
378 | 385 | | |
379 | 386 | | |
380 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
381 | 394 | | |
382 | 395 | | |
383 | 396 | | |
| |||
403 | 416 | | |
404 | 417 | | |
405 | 418 | | |
| 419 | + | |
| 420 | + | |
406 | 421 | | |
407 | 422 | | |
408 | 423 | | |
| |||
518 | 533 | | |
519 | 534 | | |
520 | 535 | | |
| 536 | + | |
521 | 537 | | |
522 | 538 | | |
523 | 539 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
0 commit comments