class_docstr: Factory transport that builds zlib compressed transports.
  
  This factory caches the last single client/transport that it was passed
  and returns the same TZlibTransport object that was created.
  
  This caching means the TServer class will get the _same_ transport
  object for both input and output transports from this factory.
  (For non-threaded scenarios only, since the cache only holds one object)
  
  The purpose of this caching is to allocate only one TZlibTransport where
  only one is really needed (since it must have separate read/write buffers),
  and makes the statistics from getCompSavings() and getCompRatio()
  easier to understand.
class_docstr_tok: ["Factory","transport","that","builds","zlib","compressed","transports",".","This","factory","caches","the","last","single","client\/transport","that","it","was","passed","and","returns","the","same","TZlibTransport","object","that","was","created",".","This","caching","means","the","TServer","class","will","get","the","_same_","transport","object","for","both","input","and","output","transports","from","this","factory",".","(","For","non-threaded","scenarios","only",",","since","the","cache","only","holds","one","object",")","The","purpose","of","this","caching","is","to","allocate","only","one","TZlibTransport","where","only","one","is","really","needed","(","since","it","must","have","separate","read\/write","buffers",")",",","and","makes","the","statistics","from","getCompSavings","(",")","and","getCompRatio","(",")","easier","to","understand","."]
docstr: Wrap a transport, trans, with the TZlibTransport
  compressed transport class, returning a new
  transport to the caller.
  
  @param compresslevel: The zlib compression level, ranging
  from 0 (no compression) to 9 (best compression).  Defaults to 9.
  @type compresslevel: int
  
  This method returns a TZlibTransport which wraps the
  passed C{trans} TTransport derived instance.
docstr_tok: ["Wrap","a","transport",",","trans",",","with","the","TZlibTransport","compressed","transport","class",",","returning","a","new","transport","to","the","caller",".","@","param","compresslevel",":","The","zlib","compression","level",",","ranging","from","0","(","no","compression",")","to","9","(","best","compression",")",".","Defaults","to","9",".","@","type","compresslevel",":","int","This","method","returns","a","TZlibTransport","which","wraps","the","passed","C","{","trans","}","TTransport","derived","instance","."]
code: def getTransport(self, trans, compresslevel=9):
      """Wrap a transport, trans, with the TZlibTransport
      compressed transport class, returning a new
      transport to the caller.
  
      @param compresslevel: The zlib compression level, ranging
      from 0 (no compression) to 9 (best compression).  Defaults to 9.
      @type compresslevel: int
  
      This method returns a TZlibTransport which wraps the
      passed C{trans} TTransport derived instance.
      """
      if trans == self._last_trans:
          return self._last_z
      ztrans = TZlibTransport(trans, compresslevel)
      self._last_trans = trans
      self._last_z = ztrans
      return ztrans
  
imports: from __future__ import division
  import zlib
  from .TTransport import TTransportBase, CReadableTransport
  from ..compat import BufferIO
label_desc: Use image node_id 1 for calling the TZlibTransportFactory obj's underlying member method code with example usage: obj.getTransport(trans, compresslevel) and returns: ztrans, self