Port libbzip2/bzip2 to c++