feat(compression): Add LZ77 and LZ78 algorithms#6910
Merged
DenizAltunkapan merged 3 commits intoTheAlgorithms:masterfrom Oct 23, 2025
Microindole:feature/compression-lz-algorithms
Merged
feat(compression): Add LZ77 and LZ78 algorithms#6910DenizAltunkapan merged 3 commits intoTheAlgorithms:masterfrom Microindole:feature/compression-lz-algorithms
DenizAltunkapan merged 3 commits intoTheAlgorithms:masterfrom
Microindole:feature/compression-lz-algorithms
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6910 +/- ##
============================================
+ Coverage 77.98% 78.06% +0.08%
- Complexity 6436 6466 +30
============================================
Files 736 738 +2
Lines 21499 21585 +86
Branches 4201 4220 +19
============================================
+ Hits 16765 16850 +85
Misses 4063 4063
- Partials 671 672 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
DenizAltunkapan
approved these changes
Oct 23, 2025
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.
Description
This PR adds two fundamental lossless compression algorithms to the
compressioncategory:Both implementations include
compressanddecompressmethods and are accompanied by comprehensive JUnit tests (LZ77Test.java,LZ78Test.java) to ensure correctness and handle edge cases like empty or null inputs.Adding these algorithms enriches the
compressionpackage by providing classic examples of dictionary-based coding, complementing the existing LZW algorithm.Related Issue
Closes #6909
Checklist