@@ -61,6 +61,11 @@ The `protobuf` standard requires transmitter and receiver to share a schema
61
61
which defines the message structure. Message length may change at runtime, but
62
62
structure may not.
63
63
64
+ There has been some discussion of supporting [ CBOR] ( https://cbor.io/ ) . There is a
65
+ MicroPython library [ here] ( https://github.com/onetonfoot/micropython-cbor ) . This
66
+ is a binary format with a focus on minimising message length. I have not yet had
67
+ time to study this.
68
+
64
69
## 1.1 Transmission over unreliable links
65
70
66
71
Consider a system where a transmitter periodically sends messages to a receiver
@@ -77,7 +82,7 @@ signals the transmitter to request retransmission.
77
82
78
83
## 1.2 Concurrency
79
84
80
- In ` uasyncio ` systems the transmitter presents no problem. A message is created
85
+ In ` asyncio ` systems the transmitter presents no problem. A message is created
81
86
using synchronous code, then transmitted using asynchronous code typically with
82
87
a ` StreamWriter ` . In the case of ASCII protocols a delimiter - usually ` b"\n" `
83
88
is appended.
@@ -99,7 +104,7 @@ identical methods so this doc may be used for both.
99
104
100
105
The advantage of ` ujson ` is that JSON strings can be accepted by CPython and by
101
106
other languages. The drawback is that only a subset of Python object types can
102
- be converted to legal JSON strings; this is a limitation of the
107
+ be converted to legal JSON strings; this is a limitation of the
103
108
[ JSON specification] ( http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf ) .
104
109
105
110
The advantage of ` pickle ` is that it will accept any Python object except for
@@ -256,7 +261,7 @@ string can be done with:
256
261
``` python
257
262
import umsgpack
258
263
obj = [1.23 , 2.56 , 89000 ]
259
- msg = umsgpack.dumps(obj) # msg is a bytes object
264
+ msg = umsgpack.dumps(obj) # msg is a bytes object
260
265
```
261
266
Retrieval of the object is as follows:
262
267
``` python
@@ -458,7 +463,7 @@ emitting field headers as seen in regular repeated fields.
458
463
>> > packed= minipb.Wire(' #z' )
459
464
>> > len (packed.encode(range (10000 )))
460
465
21748
461
- >> >
466
+ >> >
462
467
```
463
468
464
469
The author of ` minipb ` [ does not recommend] ( https://github.com/dogtopus/minipb/issues/6 )
0 commit comments