Added move_to_front_encoding implementation#874
Merged
vil02 merged 4 commits intoTheAlgorithms:masterfrom Mar 20, 2025
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #874 +/- ##
=======================================
Coverage 95.49% 95.50%
=======================================
Files 316 317 +1
Lines 22919 22948 +29
=======================================
+ Hits 21887 21916 +29
Misses 1032 1032 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
vil02
requested changes
Mar 19, 2025
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
vil02
approved these changes
Mar 20, 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 the Move-To-Front (MTF) Encoding algorithm under the compression category.
Algorithm Overview
Move-To-Front (MTF) Encoding is a lossless data compression algorithm that replaces each character with its position in a dynamically updated list. Every time a character is accessed, it moves to the front of the list. This technique is commonly used as a preprocessing step before further entropy encoding, such as Burrows-Wheeler Transform (BWT).
For more details: [Move-To-Front Transform - Wikipedia](https://en.wikipedia.org/wiki/Move-to-front_transform)
Implementation Details
Type of Change
Checklist
cargo clippy --all -- -D warningsjust before my last commit and fixed any issue that was found.cargo fmtjust before my last commit.cargo testjust before my last commit and all tests passed.mod.rsfile within its own folder, and in any parent folder(s).DIRECTORY.mdwith the correct link.CONTRIBUTING.md, and my code follows its guidelines.