At 9600 baud you could probably use a converter available from Black Box or the like. these will connect right up to a serial port and you are in business.
I have developed drivers for 3rd party interfaces capable of handle HDLC at up 2 Mbaud. In that case an 800 MHz machine benchmark indicated that explicit "bit stuffing" and its compliment took more than 50% of the CPU. Modern machines could do better of course. My point is that bits stuffing is no small task and should be implemented in hardware if possible.
So....
I recomend looking for an appropriate hardware converter.
If you decide to go ahead and do this taks in software, then I recomend you carefully review the first LV Coding challenge to get some ideas on how to to optimize large scale bit-w
ise operations in LV.
Ben