-
Notifications
You must be signed in to change notification settings - Fork 82
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
Rewrite from scratch #15
Conversation
This adds magic number support, and tries to address real-world complications such as: - The same extension might mean two or more different formats - The extension might lie about the format - Some files don't have magic numbers - Some magic numbers are found in weird places in files
OK, I think this is in good shape now. Probably the most thoroughly-documented module I've ever created, too. |
Note that reviewing this might be easiest if you first work through the README, which you can do most easily from the front page and selecting this branch. |
end | ||
|
||
|
||
abstract Formatted{F<:DataFormat} # A specific file or stream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would AbstractFormat
work here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and that's what I had originally. But somehow AbstractFormat
sounds to me more like a format specification, whereas these are supposed to represent instances (e.g., particular files).
- register packages that should be loaded before attempting to work with a particular file format. - add utilities to retrieve or skip over the magic bytes - write a lot of help!
This is fantastic, I really like the API, it feels very right. I'm looking forward to packages not needing their own |
Glad you like it, @ssfrr.
There may still be some of that; for example, are we really going to try to register each of the ~80 file formats supported by ImageMagick? As an alternative, Images might still retain an |
OK, maybe I just meant I'm looking forward to AudioIO not needing an I'll probably end up registering whatever libsndfile supports, and using Wav.jl for .wav files. I'll have to think a bit about what options will make sense. |
Looks great!!! I can't express how glad I am that you simply tackled this ;) |
Great. I'll merge this, and start playing with it myself. I am sure there will need to be little tweaks made here and there as we try it out in packages. |
This adds magic number support, and tries to address real-world
complications such as:
filesformats don't have magic numbersI'll add some documentation for this, but I may be done for the day.