equal
deleted
inserted
replaced
7 |
7 |
8 |
8 |
9 import struct |
9 import struct |
10 import sys |
10 import sys |
11 |
11 |
12 from .. import pycompat |
|
13 |
12 |
14 # Very short very of RFC 7049... |
13 # Very short very of RFC 7049... |
15 # |
14 # |
16 # Each item begins with a byte. The 3 high bits of that byte denote the |
15 # Each item begins with a byte. The 3 high bits of that byte denote the |
17 # "major type." The lower 5 bits denote the "subtype." Each major type |
16 # "major type." The lower 5 bits denote the "subtype." Each major type |
205 |
204 |
206 |
205 |
207 STREAM_ENCODERS = { |
206 STREAM_ENCODERS = { |
208 bytes: streamencodebytestring, |
207 bytes: streamencodebytestring, |
209 int: streamencodeint, |
208 int: streamencodeint, |
210 pycompat.long: streamencodeint, |
209 int: streamencodeint, |
211 list: streamencodearray, |
210 list: streamencodearray, |
212 tuple: streamencodearray, |
211 tuple: streamencodearray, |
213 dict: streamencodemap, |
212 dict: streamencodemap, |
214 set: streamencodeset, |
213 set: streamencodeset, |
215 bool: streamencodebool, |
214 bool: streamencodebool, |