I suppose the the boolean deque I can have a marker that indicates how many bits are in the deque and number of bits the start is offset from.
For alignment I need to count the bits that I remove, otherwise it would just be unknown. However this is not a complex issue.
The boolean based deque is very complex, it is currently only used by the
inflate code. The only thing is really is used for is reading bytes from the
input data buffer, getting each individual bit and then just pushing them to
another queue. Basically the input bytes are read, pushed to a queue, and then
read in the deflate handling code. So a more efficient scenario would be to
BooleanDeque and then just modify the inflate algorithm to
completely not use it for input bits. That should result in a somewhat faster
speed with regards to reading input.
I have bits read currently, however they are not correct currently.