Serialization

    Write an arbitrary value to a stream in an opaque format, such that it can be read back by . The read-back value will be as identical as possible to the original. In general, this process will not work if the reading and writing are done by different versions of Julia, or an instance of Julia with a different system image. Ptr values are serialized as all-zero bit patterns (NULL).

    An 8-byte identifying header is written to the stream first. To avoid writing the header, construct a and use it as the first argument to serialize instead. See also Serialization.writeheader.

    Open a file and serialize the given value to it.

    Julia 1.1

    source

    — Function.

    Read a value written by . deserialize assumes the binary data read from stream is correct and has been serialized by a compatible implementation of . It has been designed with simplicity and performance as a goal and does not validate the data read. Malformed data can result in process termination. The caller has to ensure the integrity and correctness of data read from .

    source

    Open a file and deserialize its contents.

    This method is available as of Julia 1.1.

    Serialization.writeheader — Function.

    Write an identifying header to the specified serializer. The header consists of 8 bytes as follows: