Boost logo

Boost :

Subject: [boost] [dynamic_bitset] Append byte to the less significant end
From: Romain CHANU (romainchanu_at_[hidden])
Date: 2010-12-23 22:19:09


Hi,

Here is my problem: i am using boost::dynamic_bitset and I would like to
append a byte to the bitset.

The idea is the following:

1) read a byte (represented as an unsigned char)
2) append the byte to the bitset
3) repeat these steps until there is no more data to read

The current "append" in the API appends a byte to the most significant end.
I would like to actually append the byte to the less significant end.

The only solution that I have found so far is to concatenate two bitsets:
http://pastebin.com/cguqaMgS

I am not sure this is a very efficient way.

Do you have any other suggestions?

Thank you for your help and Merry Christmas.

Romain


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk