On Wed, Nov 12, 2014 at 8:51 PM, Stefan Bodewig <bode...@apache.org> wrote:

> One thing BitStream and BitInputStream have in common is what happens
> when I request more bits than are available from the underlying stream,
> both will signal an EOF and discard the cached bits.  I.e if there are
> still three bits cached that haven't been read and I request four bits
> I'll get a -1 rather than the three bits, I'm not sure this is the
> correct behavior.

The (badly documented) assumption of readBits(final int count) is that
exactly count bits must be successfully read, or it's a failure. For
compression algorithms, these bits are symbols, and you can't do
anything with half a symbol.

Damjan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to