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

Can we merge all dictionaries into single compressed stream? #397

Open
arai-a opened this issue Apr 8, 2019 · 3 comments
Open

Can we merge all dictionaries into single compressed stream? #397

arai-a opened this issue Apr 8, 2019 · 3 comments
Assignees

Comments

@arai-a
Copy link
Collaborator

arai-a commented Apr 8, 2019

Just an idea for the next format.

Currently prelude and content sections have multiple small streams (1 stream for each dictionary),
and when decoding the file, decoder has to allocate buffer for each stream.
also, currently there's no information about uncompressed size for brotli stream, afaik.
That means decoder has to do allocation/reallocation multiple times while decoding prelude/content sections.

If there's no merit for compressing each stream, using single stream can make the decoder simpler.
Also, adding uncompressed size might make it simpler (of course we need to validate the size before allocation tho)

@Yoric
Copy link
Collaborator

Yoric commented Apr 9, 2019

I agree, we definitely need to investigate this.

@Yoric Yoric self-assigned this Apr 16, 2019
@Yoric
Copy link
Collaborator

Yoric commented Apr 16, 2019

I'll run a quick test on this.

@Yoric
Copy link
Collaborator

Yoric commented Apr 16, 2019

My quick test seems to indicate a small decrease in total file size. Unfortunately, I didn't write down a before/after, but it's encouraging.

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

No branches or pull requests

2 participants