Skip to content

Commit

Permalink
Feat BitArray adds data structure for read/writing unary bits and enc…
Browse files Browse the repository at this point in the history
…oding words in big/little endian notation (#191)

<!--- Please provide a general summary of your changes in the title
above -->

## Pull Request type

<!-- Please try to limit your pull request to one type; submit multiple
pull requests if needed. -->

Please check the type of change your PR introduces:

- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no API changes)
- [ ] Build-related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

## What is the current behavior?

<!-- Please describe the current behavior that you are modifying, or
link to a relevant issue. -->

Issue Number: N/A

## What is the new behavior?

<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Adds a BitArray that can read/write unary bits as well as words of all
sizes
- Supports encoding/decoding words in both big and little endian
- Packs bits within a bytes31 array
- Serialization and deserialization through Serde

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this does introduce a breaking change, please describe the
impact and migration path for existing applications below. -->

## Other information

<!-- Any other information that is important to this PR, such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: Lucas @ StarkWare <[email protected]>
  • Loading branch information
sveamarcus and 0xLucqs authored Oct 17, 2023
1 parent 2cd5cff commit a12ecb0
Show file tree
Hide file tree
Showing 4 changed files with 863 additions and 0 deletions.
Loading

0 comments on commit a12ecb0

Please sign in to comment.