size_t flushWrite() { block_size_ = kBlockSize; reverseFilter(block_data_, block_pos_); stream_->write(block_data_, block_pos_); block_pos_ = 0; return block_size_; }
size_t refillWriteAndProcess() { size_t in_pos = 0; size_t out_limit = out_buffer_.capacity(); size_t in_limit = in_buffer_.pos() - in_pos; reverseFilter(&out_buffer_[0], &out_limit, &in_buffer_[in_pos], &in_limit); in_pos += in_limit; stream_->write(&out_buffer_[0], out_limit); in_buffer_.erase(in_pos); in_buffer_.addSize(in_buffer_.reamainCapacity()); return in_buffer_.remain(); }
bool DImgBuiltinFilter::isReversible() const { return reverseFilter().isValid(); }