Skip to content

refactor!: make encode and decode traits more symmetric#112

Merged
danieleades merged 1 commit intomainfrom
refactor
Jan 12, 2026
Merged

refactor!: make encode and decode traits more symmetric#112
danieleades merged 1 commit intomainfrom
refactor

Conversation

@danieleades
Copy link
Copy Markdown
Owner

closes ##78

@danieleades
Copy link
Copy Markdown
Owner Author

could you review @DCNick3 ?

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 9, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.57%. Comparing base (b19b329) to head (44f4479).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/encoder.rs 83.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #112   +/-   ##
=======================================
  Coverage   87.57%   87.57%           
=======================================
  Files          11       11           
  Lines         483      483           
=======================================
  Hits          423      423           
  Misses         60       60           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DCNick3
Copy link
Copy Markdown
Contributor

DCNick3 commented Jan 9, 2026

These API changes look fine to me.

I wanted to try the new API out by porting my usage of arithmetic-coding to the new API, but I found out I ended up only using arithmetic-coding-core, so I can't give you any usability insights.

P.S the reason I decided against using arhithmetic-coding was mostly because I didn't like to have a dependency on bitstream-io and I wanted to write into a bignum instead of a byte stream. You can see it here: https://github.com/DCNick3/baam-compressed-token.

@danieleades
Copy link
Copy Markdown
Owner Author

These API changes look fine to me.

I wanted to try the new API out by porting my usage of arithmetic-coding to the new API, but I found out I ended up only using arithmetic-coding-core, so I can't give you any usability insights.

P.S the reason I decided against using arhithmetic-coding was mostly because I didn't like to have a dependency on bitstream-io and I wanted to write into a bignum instead of a byte stream. You can see it here: https://github.com/DCNick3/baam-compressed-token.

i'm not actually using much of the api surface of bitstream-io, so i could probably make this library a little more flexible without too much trouble

@danieleades danieleades merged commit b1501bf into main Jan 12, 2026
11 of 12 checks passed
@danieleades danieleades deleted the refactor branch January 12, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants