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

Custom encoding [JIRA: CLIENTS-767] #435

Open
ghost opened this issue Feb 14, 2016 · 2 comments
Open

Custom encoding [JIRA: CLIENTS-767] #435

ghost opened this issue Feb 14, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 14, 2016

Can we get support to add custom encoders? At the moment, it looks like content_encoding is ignored.

Adding to the confusion is custom serialisers that are called encoders, even though they are based on content_type.

At the moment I am monkey-patching riak.content.RiakContent._serialise and _deserialise, and doing both serialisation and encoding in the one method. I've also overloaded the bucket "encoders" to handle both serialisation formats and encodings. I can send a pull request it would be helpful, but it's a fairly hacky solution at the moment.

@Basho-JIRA Basho-JIRA changed the title Custom encoding Custom encoding [JIRA: CLIENTS-767] Feb 14, 2016
@lukebakken
Copy link
Contributor

Can you give more information about what you are trying to accomplish? Example code would be great. I can see that content_encoding really doesn't do anything.

@ghost
Copy link
Author

ghost commented Feb 17, 2016

Sure, so I'm saving blocks of highly compressible data (JSON mostly), and just want to apply some compression to it. I'm currently using lz4, but the same would apply for gzip, bz2, lzma, etc.

@lukebakken lukebakken modified the milestone: riak-python-client-2.7.1 Dec 16, 2016
@lukebakken lukebakken modified the milestones: riak-python-client-2.7.1, riak-python-client-3.0.0 Feb 22, 2017
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

2 participants