Help needed.

I will kindly like to ask some of you to help me out. I found an open source program written in C++, for which I was searching for a long time. The program converts between binary and ascii data some files. The truth is I do not know to much about binary file format, and I do not know C++ at all. So if somebody will be that kind to translate this in PHP I will highly appriciate it.