mercurial/utils/cborutil.py
changeset 48932 176f1a0d15dc
parent 48913 f254fc73d956
child 48942 bce8f66d3045
equal deleted inserted replaced
48931:6f10a2d6adf9 48932:176f1a0d15dc
     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,