Endianness conversion
Daniel Harding
dharding at gmail.com
Sat Feb 24 12:27:19 EST 2007
More information about the Python-list mailing list
Sat Feb 24 12:27:19 EST 2007
- Previous message (by thread): Endianness conversion
- Next message (by thread): Endianness conversion
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Feb 24, 9:39 am, Toby <etat... at gmail.com> wrote: > As part of a program I'm writing, I need to save to disk big amounts of > data (hundreds of MB, in 8kB chunks) swapping every couple of bytes. > > I obviously cannot do it in a Python loop. > > Is there a function I could use in the standard library, or do I have to > write my own C extension? Try the using the array module. array objects provide a byteswap method which reverses endianness. -Daniel
- Previous message (by thread): Endianness conversion
- Next message (by thread): Endianness conversion
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list