parameters: (self)
return_statement: return collections.namedtuple("CompressionTuple", ["compression",
                                                             "uncompressed", "compressed"])(compression=compression,
                                                                                            uncompressed=uncompressed, compressed=compressed)
docstring: Returns information about the compression of the bag
          @return: generator of CompressionTuple(compression, uncompressed, compressed) describing the
              type of compression used, size of the uncompressed data in Bytes, size of the compressed data in Bytes. If
              no compression is used then uncompressed and compressed data will be equal.
          @rtype: generator of CompressionTuple of (str, int, int)
docstring_summary: Returns information about the compression of the bag
docstring_tokens: Returns information about the compression of the bag
function: def get_compression_info(self):
          """
          Returns information about the compression of the bag
          @return: generator of CompressionTuple(compression, uncompressed, compressed) describing the
              type of compression used, size of the uncompressed data in Bytes, size of the compressed data in Bytes. If
              no compression is used then uncompressed and compressed data will be equal.
          @rtype: generator of CompressionTuple of (str, int, int)
          """
          
          compression = self.compression
          uncompressed = 0
          compressed = 0
          
          if self._chunk_headers:
              compression_counts = {}
              compression_uncompressed = {}
              compression_compressed = {}
              
              # the rest of this is determine which compression algorithm is dominant and
              # to add up the uncompressed and compressed Bytes
              for chunk_header in self._chunk_headers.values():
                  if chunk_header.compression not in compression_counts:
                      compression_counts[chunk_header.compression] = 0
                  if chunk_header.compression not in compression_uncompressed:
                      compression_uncompressed[chunk_header.compression] = 0
                  if chunk_header.compression not in compression_compressed:
                      compression_compressed[chunk_header.compression] = 0
                      
                  compression_counts[chunk_header.compression] += 1
                  compression_uncompressed[chunk_header.compression] += chunk_header.uncompressed_size
                  uncompressed += chunk_header.uncompressed_size
                  compression_compressed[chunk_header.compression] += chunk_header.compressed_size
                  compressed += chunk_header.compressed_size
                  
              chunk_count = len(self._chunk_headers)
  
              main_compression_count, main_compression = sorted([(v, k) for k, v in compression_counts.items()], reverse=True)[0]
              compression = str(main_compression)
  
          return collections.namedtuple("CompressionTuple", ["compression",
                                                             "uncompressed", "compressed"])(compression=compression,
                                                                                            uncompressed=uncompressed, compressed=compressed)
function_tokens: def get_compression_info ( self ) : compression = self . compression uncompressed = 0 compressed = 0 if self . _chunk_headers : compression_counts = { } compression_uncompressed = { } compression_compressed = { } # the rest of this is determine which compression algorithm is dominant and # to add up the uncompressed and compressed Bytes for chunk_header in self . _chunk_headers . values ( ) : if chunk_header . compression not in compression_counts : compression_counts [ chunk_header . compression ] = 0 if chunk_header . compression not in compression_uncompressed : compression_uncompressed [ chunk_header . compression ] = 0 if chunk_header . compression not in compression_compressed : compression_compressed [ chunk_header . compression ] = 0 compression_counts [ chunk_header . compression ] += 1 compression_uncompressed [ chunk_header . compression ] += chunk_header . uncompressed_size uncompressed += chunk_header . uncompressed_size compression_compressed [ chunk_header . compression ] += chunk_header . compressed_size compressed += chunk_header . compressed_size chunk_count = len ( self . _chunk_headers ) main_compression_count , main_compression = sorted ( [ ( v , k ) for k , v in compression_counts . items ( ) ] , reverse = True ) [ 0 ] compression = str ( main_compression ) return collections . namedtuple ( "CompressionTuple" , [ "compression" , "uncompressed" , "compressed" ] ) ( compression = compression , uncompressed = uncompressed , compressed = compressed )