Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!netcom!teda!ditka!mcdchg!tellab5!balr!clrcom!rmartin From: rmartin@clear.com (Bob Martin) Newsgroups: comp.lang.c Subject: Re: Binary data file compatibility across machines Message-ID: <1990Nov26.085022.5061@clear.com> Date: 26 Nov 90 08:50:22 GMT References: Organization: Clear Communications, Inc. Lines: 30 In article stiber@cs.ucla.edu (Michael D Stiber) writes: > >On different machines, the implementation of C data types is different. >So, is there an already-existing, standard solution to this >problem of binary data file transfer? >-- CCITT has created a standard called X.409. It nicely encodes data in nearly any structure at all into a moderately concise binary format. It provides for arrays, structures, strings, integers, and user formats. I have used this standard quite successfully to store data in files, or transmit data in "mail" messages between machines of different architechtures. I believe that the OSI standard for ASN.1 (X.208, X.209???) is quite similar to X.409. This standard is part of the presentation layer in the OSI 7 layer model.... Another option is a unix convention called XDR. I know very little about it, other than it is used by RPC. You might check your unix manuals... -- +-Robert C. Martin-----+:RRR:::CCC:M:::::M:| Nobody is responsible for | | rmartin@clear.com |:R::R:C::::M:M:M:M:| my words but me. I want | | uunet!clrcom!rmartin |:RRR::C::::M::M::M:| all the credit, and all | +----------------------+:R::R::CCC:M:::::M:| the blame. So there. | Brought to you by Super Global Mega Corp .com