[EMAIL PROTECTED] wrote:
> Nick> I wouldn't mind seeing some iteration-in-C bit-bashing operations
> Nick> in there eventually...
>
> Nick>data = bytes([x & 0x1F for x in orig_data])
>
> This begins to make it look what you want is array.array or nump.array.
> Python's arrays don't
Nick Coghlan wrote:
> numpy would be a big dependency to bring in just to
> get more efficient bit-oriented operations on a byte sequence
Random thought - if long integers were to use byte
sequences internally to hold their data, it might
be possible to get this more or less for free in
terms of
[EMAIL PROTECTED] wrote:
> Nick> I wouldn't mind seeing some iteration-in-C bit-bashing operations
> Nick> in there eventually...
>
> Nick>data = bytes([x & 0x1F for x in orig_data])
>
> This begins to make it look what you want is array.array or nump.array.
> Python's arrays don'
Nick> I wouldn't mind seeing some iteration-in-C bit-bashing operations
Nick> in there eventually...
Nick>data = bytes([x & 0x1F for x in orig_data])
This begins to make it look what you want is array.array or nump.array.
Python's arrays don't support bitwise operations either, b