MemoryStream to Rhino.FileIO.File3dm.Read();

I have an implementation that requires files to never touch local users hard drives, using regular .net functions i can read memory streams from non disc locations, but I see no way in rhino to pass this to fileio without it first bouncing off a hard drive.

Is this possible?

TIA.

(edit: files “can” be on local machine but, they would be encrypted, read in, and displayed in a conduit, so if there is an alternate way to do this that does not require reading it, decrypting, and writing it back to a drive so that rhino can read it, that would work too)

I solved this by using CommonObject to extract some select parts to byte array and use them outside of rhino in a new file “format” that I can handle, messy because it requires building indexing to store the byte arrays etc. but. works.

but if a method exists as per my original request to house an an entire rhino file as a piece of data in memory for dumping into and reading back out of it would be nice to know.

Thanks.

I have no experience with this, but a memory mapped file may help?

https://docs.microsoft.com/en-us/dotnet/standard/io/memory-mapped-files

I had a look, but alas the problem remains hat at some point you want to “open” it onto rhino, and cannot pass the memory mapped location. (not with my skillset anyhow).

I need to read an encrypted file, decrypt in memory, then without ever writing the decrypted file back to disc, load it into rhino from that memory. As far as i can tell impossible to do inside rhino, for now the common object seems to work, but for an entire file id have to write a seperate loop to iterate every object in rhino, time consuming, but possible. happily for now i only need the meshes so im good.