当前位置: 首页>>代码示例>>C++>>正文


C++ OutStream::out_copy_bytes方法代码示例

本文整理汇总了C++中OutStream::out_copy_bytes方法的典型用法代码示例。如果您正苦于以下问题:C++ OutStream::out_copy_bytes方法的具体用法?C++ OutStream::out_copy_bytes怎么用?C++ OutStream::out_copy_bytes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OutStream的用法示例。


在下文中一共展示了OutStream::out_copy_bytes方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: emit

    void emit(OutStream & stream) /* TODO const*/ {
        // ULONG length;

        this->RespType = 0x01;
        this->HiRespType = 0x01;
        stream.out_uint8(this->RespType);
        stream.out_uint8(this->HiRespType);
        stream.out_clear_bytes(2);
        stream.out_clear_bytes(4);
        stream.out_copy_bytes(this->Timestamp, 8);
        stream.out_copy_bytes(this->ClientChallenge, 8);
        stream.out_clear_bytes(4);
        this->AvPairList.emit(stream);
        stream.out_clear_bytes(4);
    }
开发者ID:pykoder,项目名称:redemption,代码行数:15,代码来源:ntlm_message_authenticate.hpp

示例2: compress

// TODO simplify and enhance compression using 1 pixel orders BLACK or WHITE.
void Bitmap::compress(BitsPerPixel session_color_depth, OutStream & outbuffer) const
{
    if (this->data_bitmap->compressed_size()) {
        outbuffer.out_copy_bytes(this->data_bitmap->compressed_data(), this->data_bitmap->compressed_size());
        return;
    }

    uint8_t * tmp_data_compressed = outbuffer.get_current();

    ConstImageDataView const image_view{
        this->data(),
        this->cx(),
        this->cy(),
        this->line_size(),
        this->bpp(),
        ConstImageDataView::Storage::BottomToTop
    };

    if ((session_color_depth == BitsPerPixel{32}) && ((this->bpp() == BitsPerPixel{24}) || (this->bpp() == BitsPerPixel{32}))) {
        rle_compress60(image_view, outbuffer);
    }
    else {
        rle_compress(image_view, outbuffer);
    }

    // Memoize result of compression
    this->data_bitmap->copy_compressed_buffer(
        tmp_data_compressed, outbuffer.get_current() - tmp_data_compressed);
}
开发者ID:wallix,项目名称:redemption,代码行数:30,代码来源:bitmap.cpp

示例3: emit

 void emit(OutStream & stream)override {
     stream.out_uint16_le(this->capabilityType);
     stream.out_uint16_le(this->len);
     stream.out_copy_bytes(this->terminalDescriptor, 16);
     stream.out_uint32_be(this->pad4octetsA);
     stream.out_uint16_le(this->desktopSaveXGranularity);
     stream.out_uint16_le(this->desktopSaveYGranularity);
     stream.out_uint16_le(this->pad2octetsA);
     stream.out_uint16_le(this->maximumOrderLevel);
     stream.out_uint16_le(this->numberFonts);
     stream.out_uint16_le(this->orderFlags);
     stream.out_copy_bytes(this->orderSupport, NB_ORDER_SUPPORT);
     stream.out_uint16_le(this->textFlags);
     stream.out_uint16_le(this->orderSupportExFlags);
     stream.out_uint32_le(this->pad4octetsB);
     stream.out_uint32_le(this->desktopSaveSize);
     stream.out_uint16_le(this->pad2octetsC);
     stream.out_uint16_le(this->pad2octetsD);
     stream.out_uint16_le(this->textANSICodePage);
     stream.out_uint16_le(this->pad2octetsE);
 }
开发者ID:,项目名称:,代码行数:21,代码来源:

示例4: get_compressed_data

    void get_compressed_data(OutStream & stream) const override
    {
        if (stream.tailroom() <
            static_cast<size_t>(2) + // Level1ComprFlags(1) + Level2ComprFlags(1)
                this->bytes_in_output_buffer) {
            LOG(LOG_ERR, "rdp_mppc_61_enc::get_compressed_data: Buffer too small");
            throw Error(ERR_BUFFER_TOO_SMALL);
        }

        stream.out_uint8(this->Level1ComprFlags);
        stream.out_uint8(this->Level2ComprFlags);
        stream.out_copy_bytes(this->outputBuffer, this->bytes_in_output_buffer);
    }
开发者ID:pykoder,项目名称:redemption,代码行数:13,代码来源:mppc_61.hpp

示例5: emit

 void emit(NTLM_AV_ID avId, OutStream & stream) const
 {
     stream.out_uint16_le(avId);
     stream.out_uint16_le(this->avLen);
     stream.out_copy_bytes(this->data.get(), this->avLen);
 }
开发者ID:pykoder,项目名称:redemption,代码行数:6,代码来源:ntlm_avpair.hpp


注:本文中的OutStream::out_copy_bytes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。