Serialization using XDR RFC 4506

271 Views Asked by At

I need to serialize some R objects into an XDR format that complies to RFC 4506 standards. I know about serialize:

serialize("Hello world", NULL) # xdr = TRUE
 # [1] 58 0a 00 00 00 02 00 03 04 02 00 02 03 00 00 00 00 10 00 00 00 01 00 04 00 09 00 00 00 0b 48 65 6c 6c 6f 20 77 6f 72 6c 64

With a bit of googling, it seems that R formats to RFC 1832, not RFC 4506. I can't seem to find any libraries that specifically handle XDR serialization to different formats.

Can anyone point me to a good library, or failing that some good resources for doing this by hand? I haven't had any experience with XDR before today, and I am already aware of this, which is a bit dry.

0

There are 0 best solutions below