Write CSV straight to disk as GZIP'd file?

FYI, for ultimate performance, and per discussion below,

instead of

if counter % 2000000 == 0

do

if counter.remainder(2000000) == 0

or

if counter.divisible_by?(2000000)

4 Likes