`offset := b.idx` and use `offset` instead of `b.idx-need` below?
I can get over it, but I don't really like the adding and than subtracting again.