title: Converting binary data to bytes in c#
body: <p>we have a text file containing binary values.
  say, we have a file "file.txt",it contains binary datat, say <strong>11001010</strong>
  the size of this file is <em>8 bytes</em>.
  but we want these <em>8 bytes</em> to be read as bits i.e. <em>8 bits</em> and thus make 8 bits into 1 byte. How can we do it?
  we just know the procedure:
  1. take a buffer and read individual value into buffer
  2.if the buffer value reaches 8,make those 8 bits into a byte and write to a file.</p>
  
  <p>thanks in advance.</p>