diff --git a/AK/BitStream.h b/AK/BitStream.h index 574f667c0b..94b429ed3d 100644 --- a/AK/BitStream.h +++ b/AK/BitStream.h @@ -111,6 +111,7 @@ public: /// Whether we are (accidentally or intentionally) at a byte boundary right now. ALWAYS_INLINE bool is_aligned_to_byte_boundary() const { return m_bit_offset % 8 == 0; } + ALWAYS_INLINE u8 bits_until_next_byte_boundary() const { return m_bit_offset % 8 == 0 ? 0 : 8 - m_bit_offset; } private: Optional m_current_byte;