[dev] [ask] search binary file offset in file

From: Amer <amerlyq_AT_gmail.com>
Date: Fri, 24 Mar 2017 20:03:38 +0200

Does anybody knows any cli tools which allows to search offset
of one binary file inside another ?

Find if ./chunk.bin contained and its offset inside ./dump.bin
    * simple case: 200kB inside 100MB
    * hard case: 2GB inside 100GB

I thought this idea is as old as PC itself, but I couldn't find any
tool in arch distro, nor by google, nor at github.
However, maybe my requests simply couldn't their descriptions.

I acknowledge that implementation isn't as simple as it seems,
when taking into account performance for hard case.

But I even couldn't find straight clean implementation in C / mmap().
I appreciate anything related, even links to sophisticated algorithms,
if there is really no tool / code-snippet in existence yet.
Received on Fri Mar 24 2017 - 19:03:38 CET

This archive was generated by hypermail 2.3.0 : Fri Mar 24 2017 - 19:12:14 CET