Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
When I've built these sorts of byte and bit scanners in the past I've tended to use two buffers to read into. I make one buffer the size of the largest search string and the other twice that size. Then I scan across the larger buffer to the halfway point, move the 2nd half of the data in the buffer up and stick a new chunk on it.
Later, I gave up on that and just used a 4 or 8k buffer that I loaded the second half of and worked in it. This strategy beats the file-size limit and the span issue at the same time. Bit-wise scanning sucks, tho. That just isn't fun in Perl 5. -- In reply to Re^2: Binary Comparision
by extremely
|
|