fzabkar wrote:
I have a preliminary version that incorporates your earlier requirements. I'll try to add your latest requirements soon.
Worked very well, congratulations !!!
If you would allow me (and like the challenge
![Cool 8)](./images/smilies/icon_cool.gif)
), some feature suggestions and a question:
1. Do you think you could implement footer and header hex to allow an OR operator ?
Logical example: if footer = AA or BB or CC
---> in this case would match file if any of the 3 criterias is found
---> or if
inverse is set, than would match a file if neither of the 3 criterias is found
2. About the
inverse option
Does it refers to both header and footer at the same time?
Would it be possible to enable it for footer or header individually? (one separatedly from the other)
3. About footer searching not at the very end
fzabkar wrote:
Searching for a footer at any place other than the end of the file will make the program run very slowly
I understand it would make the program run slower, but some times it would be needed.
Some data files will have the footer at the very end, but some other files might have like a few extra bytes after the real footer, for example:
<file-header><file-data><file-footer><00000000> or some other data here at the very end
In my experience I believe this is restricted to at most 4096 bytes in most files, generally less than 512 bytes but actually real cases are less than 32 or 16 bytes
Having a footer lenght option would be very usefull
For example
ftrlen=4096 option would instruct it to search for footer from the very end until 4096 bytes before it
Would it be possible that you compile a version that have this feature?
If it would decrease speed even if the option is not used, maybe compile a separate executable (1 with 1 without)
Thanks again you have excelent coding skills !!!