feat: add Base85 (ASCII85) cipher implementation#1018
Merged
siriak merged 1 commit intoTheAlgorithms:masterfrom Feb 11, 2026
Merged
feat: add Base85 (ASCII85) cipher implementation#1018siriak merged 1 commit intoTheAlgorithms:masterfrom
siriak merged 1 commit intoTheAlgorithms:masterfrom
Conversation
Contributor
Author
|
@siriak, this is ready to be merged. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1018 +/- ##
==========================================
+ Coverage 95.99% 96.01% +0.01%
==========================================
Files 382 383 +1
Lines 28744 28852 +108
==========================================
+ Hits 27594 27702 +108
Misses 1150 1150 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 an implementation of the Base85 (ASCII85) encoding and decoding cipher to the ciphers module.
Base85, also known as ASCII85, is a binary-to-text encoding scheme developed by Adobe Systems. It encodes 4 bytes of binary data into 5 ASCII characters, using characters in the range 33-117 ('!' to 'u'). This encoding is more efficient than Base64, producing approximately 25% less overhead.
Changes Made
base85.rswithbase85_encodeandbase85_decodefunctionsmod.rsto include the new base85 module and exportsDIRECTORY.mdto list the new cipher (alphabetically ordered)Implementation Details
Testing
All tests pass:
cargo test --lib ciphers::base85Example usage:
References
Checklist
mod.rsupdated with new moduleDIRECTORY.mdupdated with new ciphercargo clippycargo fmt