Packing and unpacking bitvectors

  • Thread starter Victor S. Miller
  • Start date
V

Victor S. Miller

I'm sure that this has been asked and answered before, but about 1/2
hour of searching hasn't turned up anything.

I have external data that requires the packing and unpacking of
long vectors of bits. It's not hard to do this "by hand" in Python,
but surely there must be some more efficient package that does this.
The package struct doesn't seem to be applicable, since the shortest
unit that it deals with is a byte. Given that various odd-sized
bitfields (as well as just straight bitvectors) are common enough, I
was surprised not find anything.

Can anyone help?

Victor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top