home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_901 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  1.3 KB  |  35 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from __future__ import with_statement
  5. __license__ = 'GPL v3'
  6. __copyright__ = '2008, Marshall T. Vandegrift <llasram@gmail.com>'
  7. from calibre import plugins
  8. (_lzx, _error) = plugins['lzx']
  9. if _lzx is None:
  10.     raise RuntimeError('Failed to load the lzx plugin: %s' % _error)
  11. _lzx is None
  12. __all__ = [
  13.     'Compressor',
  14.     'Decompressor',
  15.     'LZXError']
  16. LZXError = _lzx.LZXError
  17. Compressor = _lzx.Compressor
  18.  
  19. class Decompressor(object):
  20.     
  21.     def __init__(self, wbits):
  22.         self.wbits = wbits
  23.         self.blocksize = 1 << wbits
  24.         _lzx.init(wbits)
  25.  
  26.     
  27.     def decompress(self, data, outlen):
  28.         return _lzx.decompress(data, outlen)
  29.  
  30.     
  31.     def reset(self):
  32.         return _lzx.reset()
  33.  
  34.  
  35.