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

No stable frame API for dictionaries #791

Open
nigeltao opened this issue Sep 15, 2019 · 2 comments
Open

No stable frame API for dictionaries #791

nigeltao opened this issue Sep 15, 2019 · 2 comments
Milestone

Comments

@nigeltao
Copy link
Contributor

As of v1.9.2, I don't see any stable frame API (lz4frame.h) for compressing with a dictionary.

The LZ4F_frameInfo_t struct does have an unsigned dictID field, but that's just an ID, not the (const void* dictBuffer, size_t dictSize).

There is a "Bulk processing dictionary API", but it is guarded by LZ4F_STATIC_LINKING_ONLY, and my (Go) program does not static-link lz4.

The block API (lz4.h) does have LZ4_loadDict in its stable API, e.g. used by examples/dictionaryRandomAccess.c. I guess I could roll my own format to wrap the block format, or roll my own implementation of the frame format, and stick to stable LZ4 API, but the existing LZ4 framing format (and its existing unstable API) does exactly what I want.

I know that "just bless the existing unstable API as stable" can be easier said than done. I just want a LZ4-the-project issue to point people to if I'm asked why my program doesn't support LZ4-the-format dictionaries yet.

@Cyan4973
Copy link
Member

Cyan4973 commented Sep 15, 2019

That's a good point @nigeltao .
The dictionary API was still too young to be added to "stable" for v1.9.0,
but it's definitely an item on the list for next important update,
be it v1.10.0 or v2.0.0 (not decided yet).

@degski
Copy link

degski commented Sep 15, 2019

@Cyan4973 Great, I was a bit surprised that code stopped compiling last time around. Then I did figure out the LZ4F_STATIC_LINKING_ONLY flag, which solved my problem [as that's what I do].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants