  This paper considers transmitting a sequence of messages (a streaming source)
over a packet erasure channel. In each time slot, the source constructs a
packet based on the current and the previous messages and transmits the packet,
which may be erased when the packet travels from the source to the destination.
Every source message must be recovered perfectly at the destination subject to
a fixed decoding delay. We assume that the channel loss model introduces either
one burst erasure or multiple arbitrary erasures in any fixed-sized sliding
window. Under this channel loss assumption, we fully characterize the maximum
achievable rate by constructing streaming codes that achieve the optimal rate.
In addition, our construction of optimal streaming codes implies the full
characterization of the maximum achievable rate for convolutional codes with
any given column distance, column span and decoding delay. Numerical results
demonstrate that the optimal streaming codes outperform existing streaming
codes of comparable complexity over some instances of the Gilbert-Elliott
channel and the Fritchman channel.
