-
Notifications
You must be signed in to change notification settings - Fork 30
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
Perform analysis on stdin? #96
Comments
Hi @pm64 thanks for this message. I hadn't planned to add this but it would be a fairly straight forward addition that I'm happy to consider (the underlying API can accept streams or files - https://godoc.org/github.com/richardlehane/siegfried#Siegfried.Identify). The reason I've never added this before is because if you use standard PRONOM sigs then it would normally be much more efficient to let sf do the file handling. Lots of PRONOM sigs have end of file as well as beginning of file sequences & also wildcards that can appear anywhere in file: this means potentially lots of seeking and if you are supplying bytes rather than a file then those bytes will all be copied and stored by sf in memory until the match is made. So if you did want to go this route I'd suggest you'd probably also want to use the roy tool to customise a signature file that has no end of file sequences and has a fixed scan size. E.g. The only other hurdle is I've stupidly already use the |
Hi @richardlehane, thank you for your thoughtful reply. Your suggestion of excluding the EOF sequences from the signature file might help immensely in my use case, even though the file is already in RAM, depending on how I wind up streaming the bytes to stdin. Either way, I'm pleased to learn this functionality is already supported on the API level. I know the typical use case is to read files from disk, but I think many Siegfried fans will appreciate the ability to read from stdin and the increased flexibility such a feature would provide. |
Hi @pm64 |
@richardlehane, I'm testing 1.7.0 for my use case and so far it is working flawlessly. Can't thank you enough for this awesome update!! Will keep you posted. |
thanks @pm64 that's great to hear |
From what I can see, Siegfried is only able to analyze files on disk. Is there any feature planned that would allow analysis of bytes piped in via stdin?
The text was updated successfully, but these errors were encountered: