Skip to content
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

Encode QoL #183

Merged
merged 4 commits into from
Dec 6, 2023
Merged

Encode QoL #183

merged 4 commits into from
Dec 6, 2023

Conversation

uncomputable
Copy link
Collaborator

Improve quality of life in the encode module.

@uncomputable uncomputable force-pushed the encode branch 2 times, most recently from 522d4a0 to 8bf07d6 Compare December 5, 2023 14:45
uncomputable added a commit to uncomputable/asset-gen that referenced this pull request Dec 5, 2023
@apoelstra
Copy link
Collaborator

8bf07d6 looks great! My comment is a minor thing (but I do want it changed before we merge).

Every public method should return the number of written bits.
The new algorithm is nonrecursive.
We often write bits to a byte vector.
write_to_vec generalizes this workflow by writing the result of any
bit operation into a byte vector, which it returns.
The caller doesn't have to worry about I/O errors that can never occur.
@uncomputable
Copy link
Collaborator Author

uncomputable commented Dec 6, 2023

Rebased and turned BitWriter::vec into crate::write_to_vec.

Copy link
Collaborator

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 5a75b54

@apoelstra apoelstra merged commit 6950b31 into BlockstreamResearch:master Dec 6, 2023
14 checks passed
@uncomputable uncomputable deleted the encode branch December 6, 2023 21:54
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