Closed Thell closed 1 year ago
Thanks for reporting this and I apologize for the delay in getting to your report! This is an absolutely great find and I'll start working on integrating it into the project!
The search algorithm is a very naive O(N) binary search, there's undoubtedly a better algorithm. This change will require integrating into pkbuffer
as well, since the core of the issue is the search algorithm.
I'm glad you're using the library! I'll make sure to fix this soon!
Okay! This is fixed as of the newest version of PKBuffer (0.4.2). PKBuffer now uses the memchr library's two-way search algorithm for binary searching. Thanks again for reporting this! You can find a fixed commit here: https://github.com/frank2/exe-rs/commit/01320314381f9fcf9deb8867031146e285fe2097 As you can see in the Cargo file, this will be officially fixed with version 0.5.5.
This is live in 0.5.6, not 0.5.5. Thanks again for reporting this!
I've been using your library for some PE restructuring work as well as some extraction and wanted to report this so you would know...
The runtime of this is 59 seconds with the
BufferSearch
and with the only change being to use thememmem::find_iter
iter instead the runtime is ~200ms.