fun processBytes()

in plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/util/pngj/DeflatedChunksSet.kt [192:209]


    fun processBytes(buf: ByteArray, off: Int, len: Int) {
        bytesIn += len.toLong()
        // PngHelperInternal.LOGGER.info("processing compressed bytes in chunkreader : "
        // + len);
        if (len < 1 || state.isDone) return
        if (state == State.ROW_READY) throw PngjInputException("this should only be called if waitingForMoreInput")
        if (inf.needsDictionary || !inf.needsInput) error("should not happen")
        inf.setInput(buf, off, len)
        // PngHelperInternal.debug("entering processs bytes, state=" + state +
        // " callback="+callbackMode);
        if (isCallbackMode) {
            while (inflateData()) {
                val nextRowLen = processRowCallback()
                prepareForNextRow(nextRowLen)
                if (isDone) processDoneCallback()
            }
        } else inflateData()
    }