Comment 1- D' oh
Comment 2- I think you're correct about this, but there should be some sort of check for blockSize <= 1 lest there's an infinite loop although alternatively we could also throw an exception.