Finish as quickly as possible after using the required number of bits.
Merge pull request #9 from akwizgran/master

Finish as quickly as possible after using the required number of bits.