I’m using an old technology called RTTY to send data (it’s basically fancy Morse Code) over radio.
RTTY can only transmit ascii characters
What I want to do is convert a file such as a small jpg or something similar into a block of ascii text, send the characters over radio, then convert the characters on the remote end back into the original file.
Some help getting started would be great.
I know I need to use StreamReader but then how can I convert the byte[] into an encoded ascii string that I can then ‘decode’.
Basically, you want to use a Base64 conversion. It will inflate the size of the data, but it guarantees that you’ll be able to round-trip the original binary data.
Use
Convert.ToBase64Stringto convert abyte[]into astring, andConvert.FromBase64Stringto do the reverse.