MCPcopy Create free account
hub / github.com/andysworkshop/stm32plus / nextByteFromStream

Method nextByteFromStream

lib/src/stream/LzgDecompressionInputStream.cpp:251–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249 */
250
251 bool LzgDecompressionStream::nextByteFromStream(uint8_t& nextByte) {
252
253 int16_t value;
254
255 // must have a byte to read
256
257 if(_compressedSize==0)
258 return errorProvider.set(ErrorProvider::ERROR_PROVIDER_LZG_DECOMPRESSION_STREAM,E_END_OF_STREAM);
259
260 // read next byte
261
262 if((value=_input.read())<0)
263 return false;
264
265 // return it
266
267 nextByte=value;
268 _compressedSize--;
269
270 return true;
271 }
272
273
274 /*

Callers

nothing calls this directly

Calls 2

setMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected