Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-part checks with negative offset for second match #57

Closed
NebularNerd opened this issue Feb 28, 2024 · 1 comment · Fixed by #59
Closed

Multi-part checks with negative offset for second match #57

NebularNerd opened this issue Feb 28, 2024 · 1 comment · Fixed by #59

Comments

@NebularNerd
Copy link
Contributor

NebularNerd commented Feb 28, 2024

I'm just going through some various files for some formats, in some cases I could increase the confidence as the file has both a solid position for a header, but also a solid position for a footer. Would it be possible to have the multi-part use a negative byte count to match from?

This would be handy as in one case I have a file that is clashing with another match at 0.8, adding the footer as an additional match should push past this to give a solid first match. I believe this would help with things like #37 .svg matching confidence as well.

Example entry for multi-part-headers:

"4352454D" : [
    ["444f4e4500000000", -8, ".ctm", "", "CreamTracker module"]			
]
@cdgriffith cdgriffith mentioned this issue Apr 26, 2024
cdgriffith added a commit that referenced this issue Apr 26, 2024
- Adding #52 magic data for JPEG XS (thanks to Andy - NebularNerd)
- Adding #57 Multi-part checks with negative offsets (thanks to Andy - NebularNerd)
- Fixing #60 encoding warning (thanks to Andy - NebularNerd and Jason R. Coombs)

---------

Co-authored-by: Andy <NebularNerd@users.noreply.github.com>
@cdgriffith
Copy link
Owner

Added in https://github.com/cdgriffith/puremagic/releases/tag/1.22 thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants