I have a bunch of files that contain data from "foreign"
echo-sounders, and am in the process of writing a tool that
converts their heterogenous chunk into our tidy set of files :}
The files are binary, contain different objects (configuration,
sounder setup, actual acoustic data, navigational data,
annotations, ...) in no particular order, and some of them
unfortunately of varied length, too they can be very huge,
the biggest ones I saw over 120MB ... I want to split the files
into chunks in memory, and write the apropriate sections
inthe apropriate files that we use to store that kind of information
so we can analyze data that we didn't record using our own
equipment/software.
Quote:
grep works fine with binary files (it doesn't try to operate on a per line basis). Not sure if you can get it to print the byte-offset of the match, but it's worth a look at the man page methinks.
|
Hmm ...
it outputs gibberish 'til it hits end-of-file or a \0 ...
at least it does here. with other options the offset
doesn't seem right, either.
Quote:
(depending on what exactly you're doing, you didn't make it very clear)
|
Quote:
looking for a fast search algorithm, preferably ready-to-use
code in C++ :)
|
Cheers,
Tink