Fix off-by-one for getting block_size
Simplify block size calculation
Merge pull request #1 from tyll/block_size

Block size