binary_reader python 3 compatibility