mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:37:35 +00:00
LibCore: Introduce BigEndianInputBitStream
BigEndianInputBitStream is the Core::Stream API's bitwise input stream for big endian input data. The functionality and bitwise read API is almost unchanged from AK::BitStream, except that this bit stream only supports big endian operations. As the behavior for mixing big endian and little endian reads on AK::BitStream is unknown (and untested), it was never done anyways. So this was a good opportunity to split up big endian and little endian reading. Another API improvement from AK::BitStream is the ability to specify the return type of the bit read function. Always needing to static_cast the result of BitStream::read_bits_big_endian into the desired type is adding a lot of avoidable noise to the users (primarily FlacLoader).
This commit is contained in:
parent
3919a1dcc0
commit
caeb8fc691
2 changed files with 139 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
|||
|
||||
namespace AK {
|
||||
|
||||
// Obsoleted by LibCore/{Big, Little}EndianInputBitStream.
|
||||
class InputBitStream final : public InputStream {
|
||||
public:
|
||||
explicit InputBitStream(InputStream& stream)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue