-
Notifications
You must be signed in to change notification settings - Fork 92
feat: Move datacompression dependency into local file #469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
|
|
||
| let wrong_crc = Data(bytes: [0xcafeabee], count: 1) | ||
| let range = (zipped_blob.count - 8)..<(zipped_blob.count - 4) | ||
| zipped_blob.replaceSubrange(range, with: wrong_crc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test corrupts gzip structure instead of checksum fields
Low Severity
The tests testGzipCrcFail and testGzipISizeFail claim to validate CRC32 and ISIZE checksum rejection, but Data(bytes: [0xcafeabee], count: 1) creates only 1 byte of data (due to count: 1). When replaceSubrange replaces a 4-byte range with 1 byte, the gzip data becomes 3 bytes shorter, corrupting the entire structure rather than just the checksum field. The tests pass but don't actually verify the intended validation logic.
Additional Locations (1)
🤖 I have created a release *beep* *boop* --- ## [11.1.0](11.0.0...11.1.0) (2026-01-21) ### Features * Move datacompression dependency into local file ([#469](#469)) ([860674b](860674b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Release 11.1.0** > > - *Feature*: Move `datacompression` dependency into a local file (see CHANGELOG) > - Bump versions to `11.1.0` across `podspec`, Xcode project settings (`MARKETING_VERSION`, `DYLIB_CURRENT_VERSION`), `ReportingConsts.sdkVersion`, `.release-please-manifest.json`, and README dependency snippets > - Update `CHANGELOG.md` with 11.1.0 notes > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 4375a28. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: LaunchDarklyReleaseBot <LaunchDarklyReleaseBot@launchdarkly.com>
Requirements
Minus 1 external dependency to remove future version conflicts.
Address issue of version conflict in #449
Related issues
Provide links to any issues in this repository or elsewhere relating to this pull request.
Describe the solution you've provided
Provide a clear and concise description of what you expect to happen.
Describe alternatives you've considered
Provide a clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context about the pull request here.
Note
Removes the external
DataCompressiondependency by inlining its functionality and switching the SDK to use a local compression implementation.DataCompressionfromPackage.swiftandLaunchDarkly.podspecLaunchDarkly/Extensions/Data+Compression.swiftprovidinggzip/gunzip,zip/unzip,deflate/inflate, and CRC/Adler32 helpers; exposesData.ld_gzip()for call sitesDarklyServiceto useld_gzip()whenenableCompressionis onCompressionTestcovering gzip roundtrips, checksum validation, and large/random data casesWritten by Cursor Bugbot for commit df39bef. This will update automatically on new commits. Configure here.