def __init__(self, blocksize = _librsync.RS_DEFAULT_BLOCK_LEN): """Return new signature instance""" try: self.sig_maker = _librsync.new_sigmaker(blocksize) except _librsync.librsyncError, e: raise librsyncError(str(e)) self.gotsig = None self.buffer = "" self.sig_string = ""
def __init__(self, infile, blocksize = _librsync.RS_DEFAULT_BLOCK_LEN): """SigFile initializer - takes basis file basis file only needs to have read() and close() methods. It will be closed when we come to the end of the signature. """ LikeFile.__init__(self, infile) try: self.maker = _librsync.new_sigmaker(blocksize) except _librsync.librsyncError, e: raise librsyncError(str(e))
def __init__(self, infile, blocksize=_librsync.RS_DEFAULT_BLOCK_LEN): """SigFile initializer - takes basis file basis file only needs to have read() and close() methods. It will be closed when we come to the end of the signature. """ LikeFile.__init__(self, infile) try: self.maker = _librsync.new_sigmaker(blocksize) except _librsync.librsyncError, e: raise librsyncError(str(e))
def __init__(self, blocksize=_librsync.RS_DEFAULT_BLOCK_LEN): """Return new signature instance""" try: self.sig_maker = _librsync.new_sigmaker(blocksize) except _librsync.librsyncError, e: raise librsyncError(str(e))
def test_cycle(): for i in xrange(100000): sm = _librsync.new_sigmaker() sm.cycle("a")