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

A way to specify offset/length when compressing and uncompressing #45

Open
bgedik opened this issue Feb 19, 2017 · 3 comments
Open

A way to specify offset/length when compressing and uncompressing #45

bgedik opened this issue Feb 19, 2017 · 3 comments

Comments

@bgedik
Copy link

bgedik commented Feb 19, 2017

If I want to compress or uncompress only a view of my string/data, I don't see a way to do that without creating a copy. Do you think this can be added.

@martindurant
Copy link
Member

Have you considered using memoryview as a pure-python way to implement this?

@bgedik
Copy link
Author

bgedik commented May 4, 2017

Yes. It gives the following error: exceptions.TypeError: must be string or read-only buffer, not memoryview

@martindurant
Copy link
Member

I see, sorry to hear that.
Ideally it ought to work with memoryviews, but I see that the code is written in a pretty py2 kind of style.
Allowing an offset parameter doesn't sound too hard to implement, but I don't quite know how, I didn't write the original code. Perhaps an extra parameter to here?

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