Various updates

* buf[1:eos-1] copies the buffer(!); changed to resize!(buf, eos-1)
* simplified read() on bits arrays