in reply to Re^5: Search hex string in vary large binary file
in thread Search hex string in vary large binary file
your code takes 1.6s to complete ... patched MP4::Info less than 0.1s.
Hm. Sample code? The patch?
P.S. I'm sure you've read You can't parse (X)HTML with regex :-)
Tim Bray, one of the guys that put together the XML spec. does (and apparently prefers to); but that's by-the-by ....
"Parse", in the sense of read-tokenise-build a structure that represents the entire document: I probably could, but it'd be more work than I'd take on. Especially when there are free modules that will do that for me.
But if you want to extract a few values from within a jumble of text for which there is no parser, regex is the way to go.
So, if I don't give a fig for the structure of the document, I treat it as a "jumble of text"; and get the job done.
All I need is a unique anchor. And there *always* is one.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Search hex string in vary large binary file
by Anonymous Monk on Feb 07, 2015 at 21:24 UTC | |
by BrowserUk (Patriarch) on Feb 08, 2015 at 05:08 UTC | |
by Anonymous Monk on Feb 08, 2015 at 11:35 UTC |