Giter Club home page Giter Club logo

Comments (4)

cdgriffith avatar cdgriffith commented on May 20, 2024 1

What we could do there is instead of matching at offset 0 and FORM we can change to the offset where the more accurate info lives and match there instead.

Don't currently have a way to do wildcards, so can't be as accurate matching both FORM and ACBM

Thanks for the info, I can work on that when I have time. If you know a source of sample files for that please share!

from puremagic.

cdgriffith avatar cdgriffith commented on May 20, 2024 1

Thanks for the samples! Added a multi-part detect.

Should be working in 1.20 https://github.com/cdgriffith/puremagic/releases/tag/1.20

from puremagic.

NebularNerd avatar NebularNerd commented on May 20, 2024 1

Nice! I've just looked at the implementation and that's way a great way to handle it, much tidier than mine. I'll test it out later on a script I have for handling converting images between formats.

For retro uses this will be handy as there are a lot of older formats like file packers that use a two part fingerprint.

from puremagic.

NebularNerd avatar NebularNerd commented on May 20, 2024

Instead or in addition to wildcards another option could be dual match, take our .iff sample, we could look to do...

[["464f524d","494c424d"], [0,8], "", "application/x-iff", "IFF file"],

If your code sees a list instead of a string, process both hex matches using the matching offset from the next list, if both matches, we get pretty much 100% confidence it's what we think it is. Logic is a little weirder than wildcarding but it's another possible way.

Aminet is pretty much the internet oldest resource for all things Amiga, we should be able to find pretty much all things there.

7zip will happily unpack most of the .lha and other formats you'll find there. If you get stuck on any let me know and I'm sure I can unearth samples from somewhere.

from puremagic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.