From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 28884 invoked from network); 3 Apr 1998 17:49:27 -0000 Received: from iplink.net (HELO caesar.iplink.net) (192.139.81.2) by mail2.redhat.com with SMTP; 3 Apr 1998 17:49:27 -0000 Received: from caesar.iplink.net ([192.139.81.2]) by caesar.iplink.net with SMTP id <32153-869>; Fri, 3 Apr 1998 12:54:06 -0500 Date: Fri, 3 Apr 1998 12:54:04 -0500 (EST) From: Alvin Starr To: Janice McCarthy cc: axp-list@redhat.com Subject: Re: OFF-TOPIC: little-endian vs. big-endian conversion In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 3 Apr 1998, Janice McCarthy wrote: > Hello all! I know this is off-topic, but I am getting desperate. I have > some binary files that were generated on an sgi, but I need to read them > on my Alpha (UDB with linux 2.0.20). I have learned that the sgi is > big-endian, where the alpha is little-endian. The files are in the > following format: > > 1 int followed by 52 doubles - repeated 20,000 times. Ints(32bit) should be swaped 1,2,3,4 => 4,3,2,1 in 4 byte chunks If I remember correctly ieee is defined in a endian insensitive format. That is you should be able to read it correctly on all machines. But it has been a long time and I may have forgotten somthing. If the doubles have to be swaped you should be swaping the order 1,2,3,4,5,6,7,8 => 8,7,6,5,4,3,2,1 in 8 byte chunks Alvin Starr || voice: (416)493-3325 Interlink Connectivity || fax: (416)493-7974 alvin@iplink.net ||