src/bin/run.cpp
void ProcessOutput(CryptoClientArguments const & config,
                   std::string const & name,
                   std::vector<std::byte> const & result) {

    if (config.multiline_output_) {
        config.out_ << name;
    }

    // do an 64K output loop -> avoid big mem operations on large result sets
    auto data = reinterpret_cast<char const *>(result.data());
    auto size = result.size();
    while (size > 0) {
        auto block_size = std::min(size, 64ul * 1024ul);
        ProcessOutputBlock(config, data, block_size);
        size -= block_size;
        data += block_size;
    }

    if (config.multiline_output_) {
        config.out_ << std::endl;
    }
}
/**
 * @brief   Produce the output.
 * @param   config          The config as requested by the user.
 * @param   name            The name of stream to read from.
 * @param   result          The result generated.
 */
@brief   Produce the output.
@param   config          The config as requested by the user.
@param   name            The name of stream to read from.
@param   result          The result generated.
@brief Produce the output . @param config The config as requested by the user . @param name The name of stream to read from . @param result The result generated .
void ProcessOutput(CryptoClientArguments const & config,
                   std::string const & name,
                   std::vector<std::byte> const & result) {
    if (config.multiline_output_) {
        config.out_ << name;
    }
    auto data = reinterpret_cast<char const *>(result.data());
    auto size = result.size();
    while (size > 0) {
        auto block_size = std::min(size, 64ul * 1024ul);
        ProcessOutputBlock(config, data, block_size);
        size -= block_size;
        data += block_size;
    }
    if (config.multiline_output_) {
        config.out_ << std::endl;
    }
}
void ProcessOutput ( CryptoClientArguments const & config , std :: string const & name , std :: vector < std :: byte > const & result ) { if ( config . multiline_output_ ) { config . out_ << name ; } auto data = reinterpret_cast < char const * > ( result . data ( ) ) ; auto size = result . size ( ) ; while ( size > 0 ) { auto block_size = std :: min ( size , 64ul * 1024ul ) ; ProcessOutputBlock ( config , data , block_size ) ; size -= block_size ; data += block_size ; } if ( config . multiline_output_ ) { config . out_ << std :: endl ; } }
@brief   Produce the output.
@brief Produce the output .
// do an 64K output loop -> avoid big mem operations on large result sets