I played with the idea, but I though a separate class will lure people into reusing it, which means I have to handle more cases than here, where I know how it is used. But if you prefer, I can take this out. Just please don't use it in other classes since non-power-of-two buffer sizes are not preferred.