/* uzlib_inflate does a stream inflate on an RFC 1951 encoded data stream. It uses three application-specific CBs passed in the call to do the work: */
uint8_t get_byte(void)
/* uzlib_inflate does a stream inflate on an RFC 1951 encoded data stream. It uses three application-specific CBs passed in the call to do the work: */
uint8_t get_byte(void)
{
    int remaining = in->len - in->bytesRead;
    int wanted    = remaining >= READ_BLOCKSIZE ? READ_BLOCKSIZE : remaining;
    if (fread(in->block, 1, wanted, in->fin) != wanted)
      UZLIB_THROW(UZLIB_DATA_ERROR);
    in->bytesRead += wanted;
    in->inPtr      = in->block;
    in->left       = wanted-1;
  }
  return *in->inPtr++;
}