WXF (.wxf)

Background

    Wolfram exchange format.
    Binary format.
    Represents arbitrary Wolfram Language expressions in a serialized, platform-independent form.
    Versioned format.
    Developed in 2017 by Wolfram Research.

Import and Export

  • Import["file.wxf"] imports a WXF file as a Wolfram Language expression.
  • ImportString["string","WXF"] imports a WXF string of bytes.
  • ImportByteArray[bytearray, "WXF"] imports a WXF array of bytes.
  • Export["file.wxf",expr] exports the binary representation of an expr to a WXF file.
  • ExportString[expr,"WXF"] exports to a WXF string of bytes.
  • ExportByteArray[expr, "WXF"] exports an expr as a WXF byte array.

Elements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties and settings
  • Import elements:
  • "Expression"returns the serialized expression
    "HeldExpression"returns the expression wrapped in HoldComplete
  • Import by default uses the "Expression" element for Wolfram Language WXF files.

Options

Examples

open allclose all

Basic Examples  (4)

Export an expression to WXF:

In[1]:=
Click for copyable input
Out[1]=

Export a string to WXF:

In[1]:=
Click for copyable input
Out[1]=

Export a symbolic expression to WXF:

In[1]:=
Click for copyable input
Out[1]=

Import as an expression:

In[2]:=
Click for copyable input
Out[2]=

Export an arbitrary Wolfram Language expression to the WXF format:

In[1]:=
Click for copyable input

Import as an expression:

In[2]:=
Click for copyable input
Out[2]=

Scope  (2)

Import Elements  (3)

Export Options  (5)

Properties & Relations  (2)

See Also

BinarySerialize  BinaryDeserialize  Compress  "MX"  "WDX"

Introduced in 2018
(11.3)