tmbinc / bgrep

Binary Grep
http://debugmo.de/2009/04/bgrep-a-binary-grep/
368 stars 57 forks source link

add -C -A -B option ,function similar to grep #3

Closed chenyuzhen closed 3 years ago

chenyuzhen commented 11 years ago

add -C -A -B option ,function similar to grep

thx

chenyuzhen

danielg4 commented 6 years ago

Hi. I previously submitted a PR on top of that: https://github.com/maelnor/bgrep/pull/1

xloem commented 3 years ago

is this resolved? could it be closed if so, so that visitors can understand the repository more easily?

danielg4 commented 3 years ago

There are three competing patches, which must still be reconciled…

tmbinc commented 3 years ago

Thanks!

There's similar functionality in dump_context. While I like that this doesn't require lseek, it doesn't actually work if the search string is near the start of the buffer, i.e. near multiples of 1024-len(searchstring). Also, it changes the output format for the search results.

I'm favorable to a change that supports dumping context without lseek, but it would need to work in all cases.

I'm closing this for now because the basic functionality is available, but if any improvements on the current strategy are desired, I'm happy to take them.