Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
It just occurred to me that we could simplify from 3 to 2 loops,
while also making the code more adaptive to the input,
by simply determining the average line length per block.
I'll push the attached later.
thanks,
Pádraig.