A python module for generating rabin fingerprints.
The C extension implementation is based on rabin-fingerprint-c with some bugs fixed.
- Fast fingerprint generation.
- Split file into blocks according to the rabin fingerprints.
- Window/Chunk size is configurable.
- Set Rabin polynomial prime, default is 3.
- Set Rabin polynomial sliding window size, default is 48 bytes.
- Set Rabin polynomial max block size, default is 64K bytes.
- Set Rabin polynomial min block size, default is 2K bytes
- Set Rabin polynomial average block size, average is 8K bytes.
- Returns a list of tupple, each tuple represents (offset, length, fingerprint)
- Returns a list of tupple, each tuple represents (offset, length, fingerprint, filename).
- The default filename is sha1sum of the chunk with '.blk' suffix.
- Register a callback for calling when a block is reached
- The callback is called with three parameters: (offset, length, fingerprint)
- Update Rabin fingerprint list by adding a block of data
- Clear fingerprints and reset status
- Return fingerprints of all data passed by the update method
- See test/test.sh for example
- Please report bugs / mis-formatted pages to the github issure tracker.
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request