-
Notifications
You must be signed in to change notification settings - Fork 0
Home
We need a bit reader instead of representation aspects.
While the big/little endian issue can be solved by proper definition, there are some structures that have a variable bit size depending on certain frame header aspects which are impossible to set into fixed size records (notably the "UTF-8" encoded sample/frame numbers in the frame header). This could be circumvented by partially reading the fixed size structure and only decoding the variable sized, but it seems simpler to just create a bit reader and request the proper number of bits on the fly for all values.
As we already need a wrapper around Ada.Streams.Stream_IO
for SPARK reasons, we can just as well extend the SPARK_Stream_IO
to return bit values. That, of course requires tracking of bit offsets within the stream type and may complicate the SPARK interface a bit (pun intended).