in reply to Optimize bit stream conversion

Probably little difference performance-wise on such a small dataset; but it could make a notable difference if the dataset is large:

#! perl -slw use strict; my @bits = ( 1, 0, 0, 0, 0, 0, 1, 0, # A / 0x41 / 0b01000001 0, 1, 0, 0, 0, 0, 1, 0, # B / 0x42 / 0b01000010 1, 1, 0, 0, 1, 0, 1 # incomplete byte ); my $data = ''; vec( $data, $_, 1 ) = shift@bits for 0 .. 8*int( @bits/8 ) -1; ## corr +ected for complete bytes print $data; print @bits; __END__ C:\test>1136846.pl AB 1100101

Anyone got any experience of this phone's predecessor?

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!