Packing and unpacking bitvectors

Discussion in 'Python' started by Victor S. Miller, Oct 9, 2003.

  1. 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
     
    Victor S. Miller, Oct 9, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eelco
    Replies:
    121
    Views:
    1,807
    Eelco
    Jan 3, 2012
  2. Lucas L.
    Replies:
    12
    Views:
    204
    ara.t.howard
    Jun 16, 2008
  3. Aaron D. Gifford
    Replies:
    3
    Views:
    186
    Aaron D. Gifford
    Apr 7, 2011
  4. Julie

    Packing/unpacking

    Julie, Sep 22, 2003, in forum: Perl Misc
    Replies:
    2
    Views:
    110
    Chris Mattern
    Sep 22, 2003
  5. Shashank R Khanvilkar

    Packing/Unpacking bit fields from a byte.

    Shashank R Khanvilkar, Sep 25, 2005, in forum: Perl Misc
    Replies:
    6
    Views:
    438
    Anno Siegel
    Sep 26, 2005
Loading...

Share This Page