Write bits in file
Scott David Daniels
Scott.Daniels at Acm.Org
Tue May 20 00:00:10 EDT 2008
Monica Leko wrote:
> On May 18, 2:20 pm, Ken Starks <stra... at lampsacos.demon.co.uk> wrote:
>> You want your file considered as a sequence of bits rather
>> than a sequence of 8-bit bytes, do you?
> Yes.
>
>> is the 10-bit bit-pattern to be stored at an arbitrary bit-position in
>> the file
> Yes. I need arbitrary, 8bits, than 10 bits for something else, than
> sequence of bytes, than 10 bits again, etc.
You should know there is no single "natural" mapping of files to bit
orders; rather there are several distinct natural such orders. Define
the mapping you prefer and implement it. This is even worse than the
"byte sex" issue (go ahead, look it up).
--Scott David Daniels
Scott.Daniels at Acm.Org
More information about the Python-list
mailing list