add binary read to test-cpp