-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement LoadBytesToBuffer for StreamBasedReadBitBuffer.
Also adds a max_source_size_ field to the steam based read bit buffer in order to decouple the current size of the source in the buffer (which will be represented by source_size_ and aligns with the current implementation of Seek()) and the maximum allowable source size, which is initialized with the max obu size const. The constructor is updated to reflect this, with the source_size_ starting at 0. PushBytes() is updated to grow the source_size_ as bytes are pushed. In LoadBytesToBuffer, we then distinguish between cases in which we are being asked to load data that could not fit in the source with respect to the max size and the case in which we could theoretically have that data in source but we do not. In this case, pushing more bytes is necessary (and perhaps flushing). Finally, the typed tests framework is updated to include our new buffer in the suite and ensure that all base functionality works. More class specific tests will be added as more implementation is completed. PiperOrigin-RevId: 715394768
- Loading branch information
Showing
3 changed files
with
36 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters