-
Notifications
You must be signed in to change notification settings - Fork 11
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
No count in bit writer #116
Conversation
As in this variant of buffer it is difficult to achieve the same behavior as initial Lepton implementation on very small buffers (specifically before minimal stream length is 4 bytes, while here it can be shorter writing down only real stream bytes) - hashes of streams in two tests are changed. I have checked that DropBox Lepton can decode files obtained by this implementation. |
Taking into account that decoding of the formed Lepton file takes |
Now it is even faster:
|
That's great! I'll need to test with the corpus to make sure that all the files are decodablet that will take a couple days. |
Using the same scheme of making checks more rare as in reader, I've got even to
After merging this PR I prepare another with these improvements. |
8e6e003
to
6aa873e
Compare
Rebased. |
@mcroomp, any news about corpus test? |
Looks good... looks like it produces the same bits as before (except for one byte less sometimes at the end). |
This PR extends internal
low_value
buffer of bit writer and sends as many bytes as possible when number of stream bits inlow_value
exceeds MAX_STREAM_BITS. It gives substantial performance gain due to much better branch prediction onif count >= 0
- now it is very rarely true.Current
main
7ee30b6This PR 0426f91