in reply to Re^2: unpacking variable length bit fields
in thread unpacking variable length bit fields
I know what you mean. You want to be able to replace all the As with Bs and skip the first step, but of course each B starts a new byte. Maybe there could be something like unpack 'B{3,2,2,1}B{4,2,1,1}B{2,2,1,1,2}', $x?
I've also had occassion to want to extract bit-ranges that cross byte boundaries and that gets real messy. Maybe an enhanced vec that allows non-powers-of-two sizes. That shouldn't be so hard to write.
|
|---|