class_docstr: C-Accelerated version of TCompactProtocol.
  
  This class does not override any of TCompactProtocol's methods,
  but the generated code recognizes it directly and will call into
  our C module to do the encoding, bypassing this object entirely.
  We inherit from TCompactProtocol so that the normal TCompactProtocol
  encoding can happen if the fastbinary module doesn't work for some
  reason.
  To disable this behavior, pass fallback=False constructor argument.
  
  In order to take advantage of the C module, just use
  TCompactProtocolAccelerated instead of TCompactProtocol.
class_docstr_tok: ["C-Accelerated","version","of","TCompactProtocol",".","This","class","does","not","override","any","of","TCompactProtocol","'s","methods",",","but","the","generated","code","recognizes","it","directly","and","will","call","into","our","C","module","to","do","the","encoding",",","bypassing","this","object","entirely",".","We","inherit","from","TCompactProtocol","so","that","the","normal","TCompactProtocol","encoding","can","happen","if","the","fastbinary","module","does","n't","work","for","some","reason",".","To","disable","this","behavior",",","pass","fallback=False","constructor","argument",".","In","order","to","take","advantage","of","the","C","module",",","just","use","TCompactProtocolAccelerated","instead","of","TCompactProtocol","."]
code: def __init__(self, *args, **kwargs):
      fallback = kwargs.pop("fallback", True)
      super(TCompactProtocolAccelerated, self).__init__(*args, **kwargs)
      try:
          from thrift.protocol import fastbinary
      except ImportError:
          if not fallback:
              raise
      else:
          self._fast_decode = fastbinary.decode_compact
          self._fast_encode = fastbinary.encode_compact
  
imports: from .TProtocol import TType, TProtocolBase, TProtocolException, TProtocolFactory, checkIntegerLimits
  from struct import pack, unpack
  from ..compat import binary_to_str, str_to_binary
label_desc: Use image node_id 1 to create a new TCompactProtocolAccelerated object from inherited base classes: TCompactProtocol with example: obj = TCompactProtocolAccelerated()