# File lib/rubytorrent/package.rb, line 232 def each_chunk(blocksize) raise "each_chunk called on incomplete block" unless complete? start = 0 while(start < @length) yield data[start, [blocksize, @length - start].min] start += blocksize end end