Revert "Added a flush method to write any remaining bits into the byte stream"

This reverts commit 08ba18c65aa885a02fb7874cfcd7eb21383a812d.
Added a flush method to write the remaining bits into the byte stream