Add crc32.py.
This commit is contained in:
parent
e5e0166ee2
commit
123f475d65
1 changed files with 11 additions and 0 deletions
11
crc32.py
Normal file
11
crc32.py
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
import sys
|
||||||
|
import zlib
|
||||||
|
|
||||||
|
from voussoirkit import winglob
|
||||||
|
|
||||||
|
patterns = sys.argv[1:]
|
||||||
|
files = [file for pattern in patterns for file in winglob.glob(pattern)]
|
||||||
|
for file in files:
|
||||||
|
with open(file, 'rb') as handle:
|
||||||
|
crc = zlib.crc32(handle.read())
|
||||||
|
print(hex(crc)[2:].rjust(8, '0'), file)
|
Loading…
Reference in a new issue