xdrlib is used to encode and decode data in the Sun XDR (External Data Representation) format. XDR is often used as a portable way to encode binary data for use in networked applications. It’s used extensively in applications involving remote procedure calls (RPCs).
Encoding and decoding is controlled through the use of two classes:
Creates an object for packing data into an XDR representation.
Creates an object for unpacking XDR-encoded data. data is a string containing XDR-encoded data values.
An instance, p, of the Packer class supports the following methods:
Returns the current pack buffer as a string.
Resets the pack buffer to the empty string.
Packs a 32-bit unsigned ...