FreeRDP
zgfx.h
1 
20 #ifndef FREERDP_CODEC_ZGFX_H
21 #define FREERDP_CODEC_ZGFX_H
22 
23 #include <freerdp/api.h>
24 #include <freerdp/types.h>
25 
26 #include <freerdp/codec/bulk.h>
27 
28 #define ZGFX_SEGMENTED_SINGLE 0xE0
29 #define ZGFX_SEGMENTED_MULTIPART 0xE1
30 
31 #define ZGFX_PACKET_COMPR_TYPE_RDP8 0x04
32 
33 #define ZGFX_SEGMENTED_MAXSIZE 65535
34 
35 #ifdef __cplusplus
36 extern "C"
37 {
38 #endif
39 
40  typedef struct S_ZGFX_CONTEXT ZGFX_CONTEXT;
41 
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,
51  wStream* WINPR_RESTRICT sDst,
52  const BYTE* WINPR_RESTRICT pUncompressed,
53  UINT32 uncompressedSize, UINT32* WINPR_RESTRICT pFlags);
54 
55  FREERDP_API void zgfx_context_reset(ZGFX_CONTEXT* WINPR_RESTRICT zgfx, BOOL flush);
56 
57  FREERDP_API void zgfx_context_free(ZGFX_CONTEXT* zgfx);
58 
59  WINPR_ATTR_MALLOC(zgfx_context_free, 1)
60  FREERDP_API ZGFX_CONTEXT* zgfx_context_new(BOOL Compressor);
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 
66 #endif /* FREERDP_CODEC_ZGFX_H */