-
Notifications
You must be signed in to change notification settings - Fork 52
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
DataHandle: findString(..) add support handles with unknown length #339
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of quick questions:
- How much effort would be required to add a test? If easy, please do it.
- Did you verify same performance? From the patch it does not appear there would be an issue, but good to be certain.
f0780ac
to
6cf9dd9
Compare
The findString(..) method used to require the exact length of the handle, this length can be unknown, e.g. for compressed handles. This is no longer the case.
6cf9dd9
to
4a365aa
Compare
I just cleaned the code up a bit more, now it should be more clear and |
Thanks @gab1one, but my previous two questions still stand:
|
|
Why? I thought the issue was for handles that do not know their own length. As in: they return -1? Did I misunderstand?
Fair enough; let's not worry about it then. |
Yes ones that return -1. I added a test that reproduces the bug and discovered another one :), BytesHandle did not return -1 on EOF, see #341 |
handle, this length can be unknown, e.g. for compressed handles.
This is no longer the case