BitStream
A Java class that supports reading or writing individual bits to or from a stream.
Bitstream
This Java class solves a common problem in data processing: working with data at the bit level rather than the byte level. Most programming tools and file formats work in chunks of 8 bits (a byte), but sometimes you need finer control—for example, storing a yes/no flag in a single bit, or reading a compressed image format that packs multiple values into a few bits each. This class lets you read or write individual bits to a stream as if you were reading or writing larger chunks.
At a high level, the class wraps around standard Java input and output streams and adds methods to peek at and manipulate one bit at a time. Instead of asking "give me the next byte" and then doing math to extract the bit you care about, you can ask "give me the next bit" or "write this bit." The class handles all the bookkeeping—tracking which bit you're on within the current byte, bundling bits back into bytes when needed, and moving through the stream seamlessly.
You'd use this if you're working with file formats or protocols that pack data tightly at the bit level. A network engineer might use it to parse a custom binary protocol. A game developer might use it to read compressed game assets. Someone working with legacy data formats that use bit flags or bit-packed structures would find it indispensable. Any time you're writing code that deals with binary data and individual flags or small numeric values that don't need a full byte each, this class saves you from manually shifting and masking bits.
The README doesn't provide extensive detail about the API or specific methods, but the class itself is documented in the code. It's a focused, single-purpose tool: make bit-level I/O straightforward rather than error-prone.