Closed GoogleCodeExporter closed 9 years ago
Hi, thanks for the suggestion.
I can't think of a better way to do this than the one you suggest. Thinking
back I have quite often read values that I had no intention of ever using so at
first glance this appears to be quite a nice idea.
It would need changes to readlist, pack, unpack and probably read and object
creation. I'm a bit nervous about zero filling for object creation (whether
through pack or otherwise) as I don't like to break 0/1 symmetry whenever
reasonable, but it might be OK.
I'm putting this as an Accepted enhancement for now, but reserve the right to
change my mind when I've had a longer think about it!
Cheers.
Original comment by dr.scott...@gmail.com
on 5 Dec 2012 at 2:57
Thanks for the response.
Out of frustration, I enhanced bitstring to support the "pad" keyword. It
wasn't that hard, given the structure of your code.
I am not saying that I did it the way you would have (it seemed a little
hacky), but it seems to work well enough for my purposes (attached). Consider
it a starting point.
I didn't worry too much about initializing padding. If the Reserved bits are
important, they could be managed in variables so they can be re-packed. If
they are not important, setting them to zero should be fine.
Thanks again.
Original comment by edward.s...@gmail.com
on 5 Dec 2012 at 5:00
Attachments:
Original comment by dr.scott...@gmail.com
on 9 Dec 2012 at 4:05
Code changes done in r.964.
Original comment by dr.scott...@gmail.com
on 24 Feb 2013 at 8:42
Documentation in r.965
Original comment by dr.scott...@gmail.com
on 25 Feb 2013 at 5:51
Original issue reported on code.google.com by
edward.s...@gmail.com
on 5 Dec 2012 at 2:37