struct.unpack less than 1 byte

Michal Bozon bozonm at vscht.cz
Wed Oct 10 06:32:25 EDT 2007


You are able to read single bits from file in C ?

You'll have to read the bytes and than perform some bitwise operations on
them to extract the bits

> hello all,
> 
> i need to read from a file a struct like this [1byte, 12bits, 12bits]
> reading 1 byte or more is not a problem ... but the 12 bits values
> are ...
> 
> thanks




More information about the Python-list mailing list