A streaming JPEG encoder and decoder