comparison bin/cek.rb @ 124:5bafb912837e

Massive addition of old scripts collection.
author Edho Prima Arief <edho@myconan.net>
date Wed, 26 Oct 2011 15:22:00 +0700
parents 94ee419ad047
children 72c299437fde
comparison
equal deleted inserted replaced
123:173833e4ba35 124:5bafb912837e
1 #!/usr/bin/env ruby
2 require 'zlib'
3
4 block = 1048576
5 ARGV.each do |filename|
6 crc = 0
7 file = File.open(filename, 'rb')
8 currentbyte = 0
9 while (line = file.read(block)) do
10 crc = Zlib.crc32(line,crc)
11 end
12 file.close
13 printf("%s %08X\n", filename, crc.to_s)
14 end