Jump to content

External Data Representation

From Alfawiki
Adapted from the English Wikipedia article External Data Representation, available under CC BY-SA 4.0Updated 9 August 2025
Sun Microsystems
Company typePublic
IndustryComputer software, Computer hardware
FoundedFebruary 24, 1982; 44 years ago (1982-02-24) in Santa Clara, California, United States
FateAcquired by Oracle Corporation in 2010
Headquarters
Santa Clara, California
,
United States
ProductsXDR (External Data Representation), Network File System (NFS), Zettabyte File System (ZFS), Open Network Computing Remote Procedure Call (Sun RPC), others

External Data Representation (XDR) constitutes a technical standard for data serialization commonly utilized in computer network protocols, facilitating interoperability by enabling data exchange between diverse computing platforms. The process of encoding transforms native data into the XDR format, whereas decoding restores it back to its original form. XDR is delivered as a platform-independent software library, functioning without reliance on any specific transport layer or operating system.

Data serialization in XDR occurs in 4-byte (32-bit) increments using big-endian byte order; smaller data types are expanded to occupy four bytes after encoding. For variable-length entities such as strings and opaque data, padding is applied to ensure alignment to four-byte boundaries. Floating-point values adhere to the IEEE 754 specification.

History

XDR was created by Sun Microsystems during the mid-1980s and officially documented in 1987. It was later adopted as an Internet Engineering Task Force (IETF) Internet Standard in 1995.

The standard finds application across a wide range of systems and protocols, including but not limited to:

  • The Network File System protocol
  • The Zettabyte File System (ZFS)
  • Network Data Management Protocol (NDMP)
  • Open Network Computing Remote Procedure Call (Sun RPC)
  • EMC's backup solution (EMC NetWorker, previously Legato NetWorker)
  • Scientific data format NetCDF
  • Statistical computing environment R
  • The binary wire protocol of HTTP-NG
  • Serialization of compiled code in the SpiderMonkey JavaScript engine
  • The distributed monitoring framework Ganglia
  • The network monitoring protocol sFlow
  • The virtualization API and library libvirt
  • Remote binary wire protocol for the Firebird (database server)
  • Payment network protocol for Stellar

XDR data types

  • boolean
  • int – signed 32-bit integer
  • unsigned int – unsigned 32-bit integer
  • hyper – signed 64-bit integer
  • unsigned hyper – unsigned 64-bit integer
  • IEEE single and double precision floating-point numbers
  • quadruple precision floating-point (introduced in RFC1832)
  • enumeration
  • structure (record)
  • string
  • fixed-length and variable-length arrays
  • discriminated union (tagged union)
  • fixed-length and variable-length opaque data
  • void – zero-length entity
  • optional – analogous to C pointers with presence indicators, representing optional values

See also

External links

The XDR specification is detailed across three RFC documents:

  • (2006) – revises IANA assignments and security notes, clarifies citations without technical modifications.
  • (1995) – introduced quadruple precision floating-point support extending RFC 1014.
  • (1987) – initial publication.

Additional information sources: