ccpem/mrcfile

[Feature request] Ability to read from IOStream object directly

Closed this issue · 1 comments

Hi Team,
the mrcfile library assumes the source file is coming from a local storage (which IMHO is an incorrect assumption in 2023 ;)). Would you consider changing the API so the IOStream object is allowed to be passed directly to the MrcFile "constructor"?
Cheers,
Irek

the mrcfile library assumes the source file is coming from a local storage (which IMHO is an incorrect assumption in 2023 ;))

It was an incorrect assumption in 2016 when I started writing mrcfile too, which is why I didn't make it ;-)

The MrcFile class does assume you're using a local file, but there's also an MrcIntepreter class that works with arbitrary IOStreams. It's not a common use case so it's not covered in the usage guide, but as you see the class is documented and it should be easy enough to figure out how to use it. Do let me know if you have any trouble!