Example #1
0
	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 = ""
Example #2
0
	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))
Example #3
0
    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))
Example #4
0
 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))
Example #5
0
def test_cycle():
	for i in xrange(100000):
		sm = _librsync.new_sigmaker()
		sm.cycle("a")