problem_report: use iterator in CompressedValue.write - #638
Open
bdrung wants to merge 5 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #638 +/- ##
==========================================
+ Coverage 84.48% 84.51% +0.02%
==========================================
Files 106 106
Lines 21018 20990 -28
Branches 3195 3184 -11
==========================================
- Hits 17758 17739 -19
+ Misses 2785 2781 -4
+ Partials 475 470 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bdrung
force-pushed
the
use-iterator
branch
2 times, most recently
from
August 3, 2026 23:07
7377c84 to
04090a3
Compare
The method `decode_compressed_stream` is used outside of `CompressedValue`. Move this method to a stand-alone function to ease reusing it.
Do not rely on the implementation detail and create a real corrupted core dump for testing `add_gdb_info` in `test_add_gdb_info_damaged_gz_core`.
`CompressedValue.decode_compressed_stream` does not raise an `EOFError` in case the file ended before the end-of-stream marker was reached, but `gzip.GzipFile` would do that.
Make the code more readable and compact by instructing zlib to use native gzip header and trailer processing.
Use the iterator version `decode_compressed_stream` in `CompressedValue.write` to avoid code duplication.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use the iterator version
decode_compressed_streaminCompressedValue.writeto avoid code duplication.This is in preparation for #639 which is not ready yet.