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
32FREERDP_LOCAL UINT16 bulk_compression_max_size(rdpBulk* WINPR_RESTRICT bulk);
35FREERDP_LOCAL
int bulk_decompress(rdpBulk* WINPR_RESTRICT bulk,
const BYTE* WINPR_RESTRICT pSrcData,
36 UINT32 SrcSize,
const BYTE** WINPR_RESTRICT ppDstData,
37 UINT32* WINPR_RESTRICT pDstSize, UINT32 flags);
40FREERDP_LOCAL
int bulk_compress(rdpBulk* WINPR_RESTRICT bulk,
const BYTE* WINPR_RESTRICT pSrcData,
41 UINT32 SrcSize,
const BYTE** WINPR_RESTRICT ppDstData,
42 UINT32* WINPR_RESTRICT pDstSize, UINT32* WINPR_RESTRICT pFlags);
44FREERDP_LOCAL
void bulk_reset(rdpBulk* WINPR_RESTRICT bulk);
46FREERDP_LOCAL
void bulk_free(rdpBulk* bulk);
48WINPR_ATTR_MALLOC(bulk_free, 1)
50FREERDP_LOCAL rdpBulk* bulk_new(rdpContext* context);