Lines Matching refs:input_stream
24 size_t GetBytesAvailable(std::istream* input_stream) { in GetBytesAvailable() argument
25 const std::streamoff pos = input_stream->tellg(); in GetBytesAvailable()
30 input_stream->seekg(0, std::ios::end); in GetBytesAvailable()
31 if (!input_stream->good()) { in GetBytesAvailable()
35 const std::streamoff end = input_stream->tellg(); in GetBytesAvailable()
39 input_stream->seekg(pos); in GetBytesAvailable()
48 int ReadByteAsInt(std::istream* input_stream) { in ReadByteAsInt() argument
50 input_stream->read(reinterpret_cast<char*>(&byte), 1); in ReadByteAsInt()
51 if (!input_stream->good()) { in ReadByteAsInt()
59 size_t Read2ByteLength(std::istream* input_stream, bool* error) { in Read2ByteLength() argument
60 const int length_high = ReadByteAsInt(input_stream); in Read2ByteLength()
61 const int length_low = ReadByteAsInt(input_stream); in Read2ByteLength()
88 std::istream* input_stream) { in Parse() argument
91 if (ReadByteAsInt(input_stream) != 0xff || in Parse()
92 ReadByteAsInt(input_stream) != kSoi) { in Parse()
99 while ((chr = ReadByteAsInt(input_stream)) != -1) { in Parse()
105 while ((chr = ReadByteAsInt(input_stream)) == 0xff) { in Parse()
120 const size_t bytes_available = GetBytesAvailable(input_stream); in Parse()
122 input_stream->read(§ion.data[0], bytes_available); in Parse()
123 if (input_stream->good()) { in Parse()
132 const size_t length = Read2ByteLength(input_stream, &error); in Parse()
139 const size_t bytes_left = GetBytesAvailable(input_stream); in Parse()
157 input_stream->read(§ion.data[0], section.data.size()); in Parse()
158 if (input_stream->good() && in Parse()
170 input_stream->ignore(length - kSectionLengthByteSize); in Parse()