20#ifndef FREERDP_LIB_CORE_BULK_H
21#define FREERDP_LIB_CORE_BULK_H
23typedef struct rdp_bulk rdpBulk;
25#include <freerdp/api.h>
26#include <freerdp/freerdp.h>
28#define BULK_COMPRESSION_FLAGS_MASK 0xE0
29#define BULK_COMPRESSION_TYPE_MASK 0x0F
31FREERDP_LOCAL UINT16 bulk_compression_max_size(rdpBulk* WINPR_RESTRICT bulk);
33FREERDP_LOCAL
int bulk_decompress(rdpBulk* WINPR_RESTRICT bulk,
const BYTE* WINPR_RESTRICT pSrcData,
34 UINT32 SrcSize,
const BYTE** WINPR_RESTRICT ppDstData,
35 UINT32* WINPR_RESTRICT pDstSize, UINT32 flags);
36FREERDP_LOCAL
int bulk_compress(rdpBulk* WINPR_RESTRICT bulk,
const BYTE* WINPR_RESTRICT pSrcData,
37 UINT32 SrcSize,
const BYTE** WINPR_RESTRICT ppDstData,
38 UINT32* WINPR_RESTRICT pDstSize, UINT32* WINPR_RESTRICT pFlags);
40FREERDP_LOCAL
void bulk_reset(rdpBulk* WINPR_RESTRICT bulk);
42FREERDP_LOCAL
void bulk_free(rdpBulk* bulk);
44WINPR_ATTR_MALLOC(bulk_free, 1)
45FREERDP_LOCAL rdpBulk* bulk_new(rdpContext* context);