class_docstr: Class that wraps a transport with zlib, compressing writes
  and decompresses reads, using the python standard
  library zlib module.
class_docstr_tok: ["Class","that","wraps","a","transport","with","zlib",",","compressing","writes","and","decompresses","reads",",","using","the","python","standard","library","zlib","module","."]
docstr: Create a new TZlibTransport, wrapping C{trans}, another
  TTransport derived object.
  
  @param trans: A thrift transport object, i.e. a TSocket() object.
  @type trans: TTransport
  @param compresslevel: The zlib compression level, ranging
  from 0 (no compression) to 9 (best compression).  Default is 9.
  @type compresslevel: int
docstr_tok: ["Create","a","new","TZlibTransport",",","wrapping","C","{","trans","}",",","another","TTransport","derived","object",".","@","param","trans",":","A","thrift","transport","object",",","i.e",".","a","TSocket","(",")","object",".","@","type","trans",":","TTransport","@","param","compresslevel",":","The","zlib","compression","level",",","ranging","from","0","(","no","compression",")","to","9","(","best","compression",")",".","Default","is","9",".","@","type","compresslevel",":","int"]
code: def __init__(self, trans, compresslevel=9):
      """Create a new TZlibTransport, wrapping C{trans}, another
      TTransport derived object.
  
      @param trans: A thrift transport object, i.e. a TSocket() object.
      @type trans: TTransport
      @param compresslevel: The zlib compression level, ranging
      from 0 (no compression) to 9 (best compression).  Default is 9.
      @type compresslevel: int
      """
      self.__trans = trans
      self.compresslevel = compresslevel
      self.__rbuf = BufferIO()
      self.__wbuf = BufferIO()
      self._init_zlib()
      self._init_stats()
  
imports: from __future__ import division
  import zlib
  from .TTransport import TTransportBase, CReadableTransport
  from ..compat import BufferIO
label_desc: Use image node_id 1 to create a new TZlibTransport object from inherited base classes: TTransportBase, CReadableTransport with example: obj = TZlibTransport(trans, compresslevel)