FreeRDP
|
#include <winpr/assert.h>
#include <freerdp/config.h>
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/stream.h>
#include <winpr/bitstream.h>
#include <freerdp/log.h>
#include "mppc.h"
Macros | |
#define | TAG FREERDP_TAG("codec.mppc") |
#define | MPPC_MATCH_INDEX(_sym1, _sym2, _sym3) |
Functions | |
int | mppc_decompress (MPPC_CONTEXT *mppc, const BYTE *pSrcData, UINT32 SrcSize, const BYTE **ppDstData, UINT32 *pDstSize, UINT32 flags) |
int | mppc_compress (MPPC_CONTEXT *mppc, const BYTE *pSrcData, UINT32 SrcSize, BYTE *pDstBuffer, const BYTE **ppDstData, UINT32 *pDstSize, UINT32 *pFlags) |
void | mppc_set_compression_level (MPPC_CONTEXT *mppc, DWORD CompressionLevel) |
void | mppc_context_reset (MPPC_CONTEXT *mppc, BOOL flush) |
MPPC_CONTEXT * | mppc_context_new (DWORD CompressionLevel, BOOL Compressor) |
void | mppc_context_free (MPPC_CONTEXT *mppc) |
Variables | |
static const UINT32 | MPPC_MATCH_TABLE [256] |
#define MPPC_MATCH_INDEX | ( | _sym1, | |
_sym2, | |||
_sym3 | |||
) |
#define TAG FREERDP_TAG("codec.mppc") |
FreeRDP: A Remote Desktop Protocol Implementation MPPC Bulk Data Compression
Copyright 2014 Marc-Andre Moreau marca ndre .more au@g mail. com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
int mppc_compress | ( | MPPC_CONTEXT * | mppc, |
const BYTE * | pSrcData, | ||
UINT32 | SrcSize, | ||
BYTE * | pDstBuffer, | ||
const BYTE ** | ppDstData, | ||
UINT32 * | pDstSize, | ||
UINT32 * | pFlags | ||
) |
void mppc_context_free | ( | MPPC_CONTEXT * | mppc | ) |
MPPC_CONTEXT* mppc_context_new | ( | DWORD | CompressionLevel, |
BOOL | Compressor | ||
) |
void mppc_context_reset | ( | MPPC_CONTEXT * | mppc, |
BOOL | flush | ||
) |
int mppc_decompress | ( | MPPC_CONTEXT * | mppc, |
const BYTE * | pSrcData, | ||
UINT32 | SrcSize, | ||
const BYTE ** | ppDstData, | ||
UINT32 * | pDstSize, | ||
UINT32 | flags | ||
) |
Literal Encoding
Literal, less than 0x80 bit 0 followed by the lower 7 bits of the literal
Literal, greater than 0x7F bits 10 followed by the lower 7 bits of the literal
CopyOffset Encoding
CopyOffset, range [0, 63] bits 11111 + lower 6 bits of CopyOffset
CopyOffset, range [64, 319] bits 11110 + lower 8 bits of (CopyOffset - 64)
CopyOffset, range [320, 2367] bits 1110 + lower 11 bits of (CopyOffset - 320)
CopyOffset, range [2368, ] bits 110 + lower 16 bits of (CopyOffset - 2368)
CopyOffset, range [0, 63] bits 1111 + lower 6 bits of CopyOffset
CopyOffset, range [64, 319] bits 1110 + lower 8 bits of (CopyOffset - 64)
CopyOffset, range [320, 8191] bits 110 + lower 13 bits of (CopyOffset - 320)
LengthOfMatch Encoding
LengthOfMatch [3] bit 0 + 0 lower bits of LengthOfMatch
LengthOfMatch [4, 7] bits 10 + 2 lower bits of LengthOfMatch
LengthOfMatch [8, 15] bits 110 + 3 lower bits of LengthOfMatch
LengthOfMatch [16, 31] bits 1110 + 4 lower bits of LengthOfMatch
LengthOfMatch [32, 63] bits 11110 + 5 lower bits of LengthOfMatch
LengthOfMatch [64, 127] bits 111110 + 6 lower bits of LengthOfMatch
LengthOfMatch [128, 255] bits 1111110 + 7 lower bits of LengthOfMatch
LengthOfMatch [256, 511] bits 11111110 + 8 lower bits of LengthOfMatch
LengthOfMatch [512, 1023] bits 111111110 + 9 lower bits of LengthOfMatch
LengthOfMatch [1024, 2047] bits 1111111110 + 10 lower bits of LengthOfMatch
LengthOfMatch [2048, 4095] bits 11111111110 + 11 lower bits of LengthOfMatch
LengthOfMatch [4096, 8191] bits 111111111110 + 12 lower bits of LengthOfMatch
LengthOfMatch [8192, 16383] bits 1111111111110 + 13 lower bits of LengthOfMatch
LengthOfMatch [16384, 32767] bits 11111111111110 + 14 lower bits of LengthOfMatch
LengthOfMatch [32768, 65535] bits 111111111111110 + 15 lower bits of LengthOfMatch
void mppc_set_compression_level | ( | MPPC_CONTEXT * | mppc, |
DWORD | CompressionLevel | ||
) |
|
static |