Re: Bits in reverse order in BitArray

2011-07-04 Thread Christian Manning
On 04/07/2011 19:34, Steven Schveighoffer wrote: On Mon, 04 Jul 2011 14:03:35 -0400, Christian Manning wrote: Hi, when I populate a BitArray using .init, the bits are in reverse order, although the bytes are in the correct order. eg: import std.stdio,std.bitmanip; void main() { ubyte[] arr =

Re: Bits in reverse order in BitArray

2011-07-04 Thread Steven Schveighoffer
On Mon, 04 Jul 2011 14:03:35 -0400, Christian Manning wrote: Hi, when I populate a BitArray using .init, the bits are in reverse order, although the bytes are in the correct order. eg: import std.stdio,std.bitmanip; void main() { ubyte[] arr = [130,56,43,2]; BitArray ba; b

Bits in reverse order in BitArray

2011-07-04 Thread Christian Manning
Hi, when I populate a BitArray using .init, the bits are in reverse order, although the bytes are in the correct order. eg: import std.stdio,std.bitmanip; void main() { ubyte[] arr = [130,56,43,2]; BitArray ba; ba.init(cast(void[])arr,32); foreach(b; ba) write(cast(ubyte