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: Get the current measured compression ratios (in,out) from
  this transport.
  
  Returns a tuple of:
  (inbound_compression_ratio, outbound_compression_ratio)
  
  The compression ratios are computed as:
      compressed / uncompressed
  
  E.g., data that compresses by 10x will have a ratio of: 0.10
  and data that compresses to half of ts original size will
  have a ratio of 0.5
  
  None is returned if no bytes have yet been processed in
  a particular direction.
docstr_tok: ["Get","the","current","measured","compression","ratios","(","in",",","out",")","from","this","transport",".","Returns","a","tuple","of",":","(","inbound_compression_ratio",",","outbound_compression_ratio",")","The","compression","ratios","are","computed","as",":","compressed","\/","uncompressed","E.g.",",","data","that","compresses","by","10x","will","have","a","ratio","of",":","0.10","and","data","that","compresses","to","half","of","ts","original","size","will","have","a","ratio","of","0.5","None","is","returned","if","no","bytes","have","yet","been","processed","in","a","particular","direction","."]
code: def getCompRatio(self):
      """Get the current measured compression ratios (in,out) from
      this transport.
  
      Returns a tuple of:
      (inbound_compression_ratio, outbound_compression_ratio)
  
      The compression ratios are computed as:
          compressed / uncompressed
  
      E.g., data that compresses by 10x will have a ratio of: 0.10
      and data that compresses to half of ts original size will
      have a ratio of 0.5
  
      None is returned if no bytes have yet been processed in
      a particular direction.
      """
      r_percent, w_percent = (None, None)
      if self.bytes_in > 0:
          r_percent = self.bytes_in_comp / self.bytes_in
      if self.bytes_out > 0:
          w_percent = self.bytes_out_comp / self.bytes_out
      return (r_percent, w_percent)
  
imports: from __future__ import division
  import zlib
  from .TTransport import TTransportBase, CReadableTransport
  from ..compat import BufferIO
label_desc: Use image node_id 5 for calling the TZlibTransport obj's underlying member method code with example usage: obj.getCompRatio() and returns: r_percent,  w_percent