comparison bin/cek.rb @ 486:324c5842af87

Replace tabs with spaces.
author edogawaconan <me@myconan.net>
date Wed, 16 Oct 2013 03:45:54 +0900
parents 72c299437fde
children a0f4a3e15322
comparison
equal deleted inserted replaced
483:ee4ce7e78d2d 486:324c5842af87
1 #!/usr/bin/env ruby 1 #!/usr/bin/env ruby
2 require 'zlib' 2 require 'zlib'
3 3
4 block = 1048576 4 block = 1048576
5 ARGV.each do |filename| 5 ARGV.each do |filename|
6 crc = 0 6 crc = 0
7 file = File.open(filename, 'rb') 7 file = File.open(filename, 'rb')
8 currentbyte = 0 8 currentbyte = 0
9 while (line = file.read(block)) do 9 while (line = file.read(block)) do
10 crc = Zlib.crc32(line,crc) 10 crc = Zlib.crc32(line,crc)
11 end 11 end
12 file.close 12 file.close
13 printf("%s %08X\n", filename, crc.to_i) 13 printf("%s %08X\n", filename, crc.to_i)
14 end 14 end