20 #ifndef FREERDP_CODEC_ZGFX_H
21 #define FREERDP_CODEC_ZGFX_H
23 #include <freerdp/api.h>
24 #include <freerdp/types.h>
26 #include <freerdp/codec/bulk.h>
28 #define ZGFX_SEGMENTED_SINGLE 0xE0
29 #define ZGFX_SEGMENTED_MULTIPART 0xE1
31 #define ZGFX_PACKET_COMPR_TYPE_RDP8 0x04
33 #define ZGFX_SEGMENTED_MAXSIZE 65535
40 typedef struct S_ZGFX_CONTEXT ZGFX_CONTEXT;
42 FREERDP_API
int zgfx_decompress(ZGFX_CONTEXT* WINPR_RESTRICT zgfx,
43 const BYTE* WINPR_RESTRICT pSrcData, UINT32 SrcSize,
44 BYTE** WINPR_RESTRICT ppDstData,
45 UINT32* WINPR_RESTRICT pDstSize, UINT32 flags);
46 FREERDP_API
int zgfx_compress(ZGFX_CONTEXT* WINPR_RESTRICT zgfx,
47 const BYTE* WINPR_RESTRICT pSrcData, UINT32 SrcSize,
48 BYTE** WINPR_RESTRICT ppDstData, UINT32* pDstSize,
49 UINT32* WINPR_RESTRICT pFlags);
50 FREERDP_API
int zgfx_compress_to_stream(ZGFX_CONTEXT* WINPR_RESTRICT zgfx,
52 const BYTE* WINPR_RESTRICT pUncompressed,
53 UINT32 uncompressedSize, UINT32* WINPR_RESTRICT pFlags);
55 FREERDP_API
void zgfx_context_reset(ZGFX_CONTEXT* WINPR_RESTRICT zgfx, BOOL flush);
57 FREERDP_API
void zgfx_context_free(ZGFX_CONTEXT* zgfx);
59 WINPR_ATTR_MALLOC(zgfx_context_free, 1)
60 FREERDP_API ZGFX_CONTEXT* zgfx_context_new(BOOL Compressor);