Write bits in file

Ken Starks straton at lampsacos.demon.co.uk
Sun May 18 11:08:49 EDT 2008


I admit that I was mostly just interested in getting your
question clarified, rather than having any great experise.

But a bit of Googling took me to the 'Bit vector' module,
[I googled: 'python ("bit array" OR "bit vector")']
which might be what you are after. I have no experience
with it, myself:

http://cobweb.ecn.purdue.edu/~kak/dist/BitVector-1.4.1.html

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.
> 
> 



More information about the Python-list mailing list