Back to index

obnam  1.1
Public Member Functions | Public Attributes
obnamlib.plugins.compression_plugin.DeflateCompressionFilter Class Reference

List of all members.

Public Member Functions

def __init__
def filter_read
def filter_write

Public Attributes

 tag
 app
 warned

Detailed Description

Definition at line 23 of file compression_plugin.py.


Constructor & Destructor Documentation

Definition at line 25 of file compression_plugin.py.

00025 
00026     def __init__(self, app):
00027         self.tag = "deflate"
00028         self.app = app
00029         self.warned = False


Member Function Documentation

def obnamlib.plugins.compression_plugin.DeflateCompressionFilter.filter_read (   self,
  data,
  repo,
  toplevel 
)

Definition at line 30 of file compression_plugin.py.

00030 
00031     def filter_read(self, data, repo, toplevel):
00032         return zlib.decompress(data)
        

Here is the caller graph for this function:

def obnamlib.plugins.compression_plugin.DeflateCompressionFilter.filter_write (   self,
  data,
  repo,
  toplevel 
)

Definition at line 33 of file compression_plugin.py.

00033 
00034     def filter_write(self, data, repo, toplevel):
00035         how = self.app.settings['compress-with']
00036         if how == 'deflate':
00037             data = zlib.compress(data)
00038         elif how == 'gzip':
00039             if not self.warned:
00040                 self.app.ts.notify("--compress-with=gzip is deprecated.  " +
00041                                    "Use --compress-with=deflate instead")
00042                 self.warned = True
00043             data = zlib.compress(data)
00044 
00045         return data
00046     

Here is the caller graph for this function:


Member Data Documentation

Definition at line 27 of file compression_plugin.py.

Definition at line 26 of file compression_plugin.py.

Definition at line 28 of file compression_plugin.py.


The documentation for this class was generated from the following file: