-
Notifications
You must be signed in to change notification settings - Fork 2
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
Dictionary support #16
Comments
Hi Rob, I agree with you. I'd like to support streaming compression/decompression. I have tried to implement like Advanced streaming functions are experimental and are documented to "Use them only in association with static linking". Compress::Zstd uses static linking now but I'm planning to use dynamic linking because libzstd is already popular library and already included in any major package systems like Homebrew, Ubuntu, and so on. I have never used the dictionary compression with production use so far, so I have not decided which way to choose. Do you use the dictionary compression? Thanks, |
@spiritloose I've only used dictionary compression in experiments to see how much space it would save me; I haven't used it in production yet because this module doesn't support it. |
Dictionary support would be very useful to me as well. Specifically, I'd like to be able to feed data into an object or function, and then extract the dictionary. Later, I'd like to provide the dictionary and some data to the compress function, and get a result which can be decompressed with the same dictionary. This would allow me to compress a lot of small pieces of data while still being able to address them individually, and without the huge overhead of having a new dictionary for each. Thanks, |
Thanks for the update! I'd like to test this; it's not clear how I'd go about accomplishing my use case:
Then, to decompress:
I apologize if this should be obvious to me; I've looked at the source and while I see where it's now possible to pass a dictionary to compression and decompression routines, it's not clear how to train a dictionary. Thanks for your help! |
May I suggest that decompression using an existing dictionary might be easier to implement than compression or dictionary-building, and so that might be the thing to add first? |
I don't have an existing dictionary and compressed strings to use. I suppose I could dump the strings to use to build the dictionary to a lot of temp files and use the Obviously this hasn't been a high priority. I'm still interested in it though. |
Hi @plambert, sorry I wasn't clear. Adding decompression support only, without implementing support for compression using a dictionary, wouldn't help your use case. I only meant it might be easier to implement. And it would help my use case, where I have a fixed dictionary I prepared as a one-off; so apologies for squatting on your feature request. |
Hello there!
I'm interested in using this module, but I'd really like support for zstd dictionaries. I'm willing to add this myself, but I thought I'd open an issue here first to see if a) it's a feature you'd be interested in merging, and b) what you think the interface should look like. Let me know what you think!
-Rob
The text was updated successfully, but these errors were encountered: