-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust: read: handle padded compressed chunks properly (#1299)
### Changelog - rust: fixed case where a compressed chunk with padding bytes added by the compressor at the end would break decompression. ### Docs None. ### Description When MCAPs are written, the compressor may insert padding bytes at the end of a compressed block after all useful data bytes are written. This means that when the decompressor is reading messages out, it will have decompressed all message bytes out of a compressed chunk _before_ it reaches the end of the compressed data. Right now, the rust MCAP library will see that there is more unused data in the compressed chunk, try to decompress another message, but get no output from of the decompressor when it tries. Right now this causes the reader to loop infinitely. This PR adds a file to LFS which triggers this condition and fixes it. <!-- Describe the problem, what has changed, and motivation behind those changes. Pretend you are advocating for this change and the reader is skeptical. --> <!-- In addition to unit tests, describe any manual testing you did to validate this change. --> <table><tr><th>Before</th><th>After</th></tr><tr><td> <!--before content goes here--> </td><td> <!--after content goes here--> </td></tr></table> <!-- If necessary, link relevant Linear or Github issues. Use `Fixes: foxglove/repo#1234` to auto-close the Github issue or Fixes: FG-### for Linear isses. -->
- Loading branch information
Showing
3 changed files
with
53 additions
and
13 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
Git LFS file not shown