Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com From: "Suhaib M. Siddiqi" To: "Mumit Khan" , "Isselmou Ould-Dellahy" Cc: Subject: RE: unix/MS binary file format Date: Fri, 16 Jul 1999 21:29:16 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <199907162240.RAA20005@mercury.xraylith.wisc.edu> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Importance: Normal Just a notes the CDF, NetCDF, HDF, and FXDR for Cygwin from my URL (www.geocities.com/ResearchTriangle/Forum/628 and http://siddiqi.webjump.com). I have another library called XDRF, which allows to write portable binary files in C and F77 both. I use FXDR and XDRF with my few software. Suhaib > -----Original Message----- > From: cygwin-owner AT sourceware DOT cygnus DOT com > [mailto:cygwin-owner AT sourceware DOT cygnus DOT com]On Behalf Of Mumit Khan > Sent: Friday, July 16, 1999 6:40 PM > To: Isselmou Ould-Dellahy > Cc: cygwin AT sourceware DOT cygnus DOT com > Subject: Re: unix/MS binary file format > > > "Isselmou Ould-Dellahy" writes: > > Hi, > > > > I would like to create and to be able to read binary files > > on cygwin, such that I can use such files under unix. > > > > Actually under cygnus the binary files are coded in > > unix reverse order. For example when I put the integer 327656666 > > in a binary file (using fwrite) and display it using "od -c" > > I have : > > > > Unix format : > > 0000000 023 207 244 332 > > 0000004 > > NT format : > > 0000000 332 244 207 023 > > 0000004 > > > > My question is : how can I generate and read unix binary > > file format under cygwin ? > > > > It's not an Unix vs Cygwin issue, but rather a "endian-ness" issue, > and hence independent of Cygwin. Little Endian CPUs (eg., x86) will > store binary data differently by default than Big Endian CPUs (eg., > SPARC), even when both are running Unix. > > Binary files are almost by definition non-portable, but fortunately > that's not the end of the world. There are a variety of libraries > that will allow you to read/write binary data portably. Please search > for CDF, HDF, netCDF, XDR. My own code uses a XDR based library that > is customized for our data reader/writer classes. > > HDF - http://hdf.ncsa.uiuc.edu/ > NetCDF - http://www.unidata.ucar.edu/ > CDF - http://nssdc.gsfc.nasa.gov/cdf > XDR - Sun's documentation (http://docs.sun.com/) > > > My preference for general-purpose work is NetCDF, but the others > are just as good. Most of these will build out of the box (and > others have done the port -- check the archives) on Cygwin with > minor configuration tweaks. > > Regards, > Mumit > > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com > -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com