python and bit shifts and byte order, oh my!
rnichol_rrc at yahoo.com
Fri Sep 10 22:51:33 CEST 2004
Jason Lai wrote:
> If efficiency isn't important, you could forget about the whole
> byte-order thing and just read/write it byte-by-byte. Then you can think
> of the file as a bit-stream (everything gets written in order and read
> back in order), although you still have to read/write a whole 8-bit byte
> at a time.
> - Jason Lai
Since the format can have:
I assumed that I would have to write byte by byte. And I don't really
consider speed important so I think that it's viable to do it this way.
This is what I meant.
More information about the Python-list