From: olchansk@a0.phy.bnl.gov (Konstantin Olchanski)
Subject: Re: DEC Alpha- big endian or little endian?
Date: 1996/02/09 [thread overview]
Message-ID: <4ffml4$fb2@sun20.ccd.bnl.gov> (raw)
In-Reply-To: jfm6-0302962341500001@dlup-j.jagunet.com
In article <jfm6-0302962341500001@dlup-j.jagunet.com>, jfm6@jagunet.com (John McNamara) writes:
> In article <4ejjs1$2pr@sun20.ccd.bnl.gov>,
> olchansk@a0.phy.bnl.gov (Konstantin Olchanski) wrote:
> >
> >The problem is that all our data sets are written in the
> > big-endian format and the little-endian version
> > of our code cannot read them.
>
> Why not just write the few lines of code to swap bytes on
> read and write? If you're really dealing with large files,
> the programs are likely memory bound in which case the few
> extra logical ops to swap bytes should be essentially free.
"just swapping bytes" gets somewhat complicated if the data
is a horrible mix of ints, shorts and chars...
but, I guess there is no other way...
I am considering writing
a program in perl to read the C header files
and automatically produce endian-changing routines.
Maybe somebody already did this? Any suggestions?
C.O.
next prev parent reply other threads:[~1996-02-09 5:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-01-29 5:00 DEC Alpha- big endian or little endian? Konstantin Olchanski
1996-02-03 5:00 ` John McNamara
1996-02-04 5:00 ` bruce
1996-02-09 5:00 ` Konstantin Olchanski [this message]
1996-02-16 5:00 ` bruce
1996-02-04 5:00 ` fairfield
1996-02-05 5:00 ` Steve Lionel
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox