Archived

This forum has been archived. Please start a new discussion on GitHub.

Python serialization

I have read that the streaming api is not available in python currently but is it possible to read a binary file written out from another application using ICE/Streaming api?

Comments

  • mes
    mes California
    Hi,

    I'm afraid there isn't even an undocumented way to accomplish that right now.

    Take care,
    - Mark
  • Python struct module....

    I've come across the same problem ( reading data in python streamed from java).

    Python's struct module is very useful for achieving this. The marshalling format for ice classes is rather involved but if you limit yourself to streaming ice structs from C++/Java, writing code to unmarshall in python via Struct is quite straightforward. You'll need a few conveneince functions to unmarshal sequences/dictionaries and a function to deal with ice strings + ice's encoding for lengths, but it's not that involved, and performance is very good compared to pickle etc..

    Lets know if you need more info...

    Cheers,

    A.