  We consider a real-time streaming source coding system in which an encoder
observes a sequence of randomly arriving symbols from an i.i.d. source, and
feeds binary codewords to a FIFO buffer that outputs one bit per time unit to a
decoder. Each source symbol represents a status update by the source, and the
timeliness of the system is quantified by the age of information (AoI), defined
as the time difference between the present time and the generation time of the
most up-to-date symbol at the output of the decoder. When the FIFO buffer is
allowed to be empty, we propose an optimal prefix-free lossless coding scheme
that minimizes the average peak age based on the analysis of discrete-time
Geo/G/1 queue. For more practical scenarios in which a special codeword is
reserved for indicating an empty buffer, we propose an encoding scheme that
assigns a codeword to the empty buffer state based on an estimate of the buffer
idle time.
