本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}