ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Split file when some binary patterns are found?

<< < (2/2)

MilesAhead:
I wasn't talking about byte by byte file i/o.  I was talking about the pattern match.  To search for the patterns, since multiple are allowed, you would naturally compare each byte to a table of the first characters from all the patterns.  On match then continue the comparison, etc..

From what you say it sounds more like the resource file is homogenous.  In that case once you found the first match you would limit the search to that pattern.  Otherwise I don't see how it could be done without big iron.

ConstanceJill:
That particular file is homegenous indeed, but it may not always be the case.
And well, I don't exactly know why it's so fast (took a quick look at the source code, but I don't really know much about C), but since it is, I guess that means that no, looking for several patterns isn't such a big deal after all.

MilesAhead:
That particular file is homegenous indeed, but it may not always be the case.
And well, I don't exactly know why it's so fast (took a quick look at the source code, but I don't really know much about C), but since it is, I guess that means that no, looking for several patterns isn't such a big deal after all.
-ConstanceJill (April 12, 2014, 05:47 PM)
--- End quote ---

I don't see how you draw the conclusion concerning the heterogeneous case from the homogenous benchmark.  In any case I suspect there's a reason the utility has lain dormant.

ConstanceJill:
I don't see how you draw the conclusion concerning the heterogeneous case from the homogenous benchmark.-MilesAhead (April 12, 2014, 06:17 PM)
--- End quote ---
Who said I had only tested it with that one particular file?
Either way I don't get where you're trying to go from there. Are you implying that the program would be "cheating" and stopping to search for the other binary patterns once it has found one or something like this?
You seem to be really convinced that such operation just cannot be done fast for some reason… I don't really understand why. And even if it has to be take a bit of time to be done thoroughly, who cares, as long as it stays within a reasonable time frame?
In addition, if the user can choose to disable the search for some patterns, it should then make it operate faster, right?

MilesAhead:
I think I'll leave this to others as the utility in question is Win9x based.

(  Edit:  Actually I'm in error. It's Dos based. Even C based languages are vastly different now.  )

Navigation

[0] Message Index

[*] Previous page

Go to full version