Skip to content

Allow odd length prefix#9

Open
gpsanant wants to merge 2 commits intonlordell:mainfrom
gpsanant:allow-odd-length-prefix
Open

Allow odd length prefix#9
gpsanant wants to merge 2 commits intonlordell:mainfrom
gpsanant:allow-odd-length-prefix

Conversation

@gpsanant
Copy link

@gpsanant gpsanant commented Oct 14, 2023

allows for odd length prefixes.

still uses efficient logic for even length prefixes, uses less efficient logic for odd length prefixes.

disclaimer: I barely know rust

@nlordell
Copy link
Owner

Thanks for the contribution! One issue I see with the current implementation is that it allocates a Vec on the heap for each check. Ideally, it would be possible to do without this by comparing the bytes directly and potentially using a mask for the last nibble.

I'm not sure what the best way to structure the code for this would be.

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