[OSM-dev] Ruby help - streams of bits

Dan Moore writetodan at yahoo.com
Thu May 17 14:46:02 BST 2007


hi Richard,

i don't know for sure, but this looks pertinent:  

http://www.example-code.com/ruby/aes_rubyEncryptByteArray.asp

it talks about what's efficient and what's not.  also, i think you'll need to keep track of 'current' incomplete byte and a count of bits written (to determine no. of bits to add to 'current' byte) and use bit-shifting (to hack off those bits) to compose each byte to write:

http://www.nabble.com/Shift-Operators---I-don't-get-it--What's-the-application-!--t3731178.html

hope that helps,
dan.




       
____________________________________________________________________________________Sick sense of humor? Visit Yahoo! TV's 
Comedy with an Edge to see what's on, when. 
http://tv.yahoo.com/collections/222




More information about the dev mailing list