input_stream is a byte stream