Skip to content

Conversation

@rfecher
Copy link
Collaborator

@rfecher rfecher commented Sep 29, 2014

I added a BinaryEncoding interface and an EncodingTest in the test code to run through several implementations of the interface. I tried to wrap the bennight encoder with the interface but I did not succeed (the check that the original matches the byte[] after base encode, UTF-8 encode, UTF-8 decode, base decode fails half the time). Maybe you can find the issue?

Base64 encoding will encode 4 chars from every 3 bytes, and theoretically with base128 that could be changed (improved?) to encode 8 chars with every 7 bytes, but I think we'd want to ensure that we don't end up encode an additional 8 chars for every overflow (ie. we wouldn't want to encode 8 chars from 1 byte).

Also with base-128 we'd have to ensure we preserve sort order which should be do-able. Just another thing to consider.

@rfecher
Copy link
Collaborator Author

rfecher commented Sep 29, 2014

oh and I made a com.fecher package just to be annoying ;)

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.

1 participant