  Alice and Bob are connected via a two-way channel, and Alice wants to send a
message of $L$ bits to Bob. An adversary flips an arbitrary but finite number
of bits, $T$, on the channel. This adversary knows our algorithm and Alice's
message, but does not know any private random bits generated by Alice or Bob,
nor the bits sent over the channel, except when these bits can be predicted by
knowledge of Alice's message or our algorithm. We want Bob to receive Alice's
message and for both players to terminate, with error probability at most
$\delta > 0$, where $\delta$ is a parameter known to both Alice and Bob.
Unfortunately, the value $T$ is unknown in advance to either Alice or Bob, and
the value $L$ is unknown in advance to Bob. We describe an algorithm to solve
the above problem while sending an expected $L + O \left( T + \min
\left(T+1,\frac{L}{\log L} \right) \log \left( \frac{L}{\delta} \right)
\right)$ bits. A special case is when $\delta = O(1/L^c)$, for some constant
$c$. Then when $T = o(L/\log L)$, the expected number of bits sent is $L +
o(L)$, and when $T = \Omega(L)$, the expected number of bits sent is $L +
O\left( T \right)$, which is asymptotically optimal.
