FreeRDP
|
#include <winpr/assert.h>
#include <freerdp/config.h>
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/bitstream.h>
#include <freerdp/log.h>
#include <freerdp/types.h>
#include "ncrush.h"
Macros | |
#define | TAG FREERDP_TAG("codec") |
Functions | |
static INLINE UINT16 | get_word (const BYTE *data) |
static INLINE UINT32 | get_dword (const BYTE *data) |
static INLINE BOOL | NCrushFetchBits (const BYTE **SrcPtr, const BYTE **SrcEnd, INT32 *nbits, UINT32 *bits) |
static INLINE void | NCrushWriteStart (UINT32 *bits, UINT32 *offset, UINT32 *accumulator) |
static INLINE void | NCrushWriteBits (BYTE **DstPtr, UINT32 *accumulator, UINT32 *offset, UINT32 _bits, UINT32 _nbits) |
static INLINE void | NCrushWriteFinish (BYTE **DstPtr, UINT32 accumulator) |
int | ncrush_decompress (NCRUSH_CONTEXT *ncrush, const BYTE *pSrcData, UINT32 SrcSize, const BYTE **ppDstData, UINT32 *pDstSize, UINT32 flags) |
static int | ncrush_hash_table_add (NCRUSH_CONTEXT *ncrush, const BYTE *pSrcData, UINT32 SrcSize, UINT32 HistoryOffset) |
static int | ncrush_find_match_length (const BYTE *Ptr1, const BYTE *Ptr2, const BYTE *HistoryPtr) |
static int | ncrush_find_best_match (NCRUSH_CONTEXT *ncrush, UINT16 HistoryOffset, UINT32 *pMatchOffset) |
static int | ncrush_move_encoder_windows (NCRUSH_CONTEXT *ncrush, BYTE *HistoryPtr) |
int | ncrush_compress (NCRUSH_CONTEXT *ncrush, const BYTE *pSrcData, UINT32 SrcSize, BYTE *pDstBuffer, const BYTE **ppDstData, UINT32 *pDstSize, UINT32 *pFlags) |
static int | ncrush_generate_tables (NCRUSH_CONTEXT *context) |
void | ncrush_context_reset (NCRUSH_CONTEXT *ncrush, BOOL flush) |
NCRUSH_CONTEXT * | ncrush_context_new (BOOL Compressor) |
void | ncrush_context_free (NCRUSH_CONTEXT *ncrush) |
Variables | |
static const UINT16 | HuffTableLEC [8192] |
static const UINT16 | HuffTableLOM [512] |
static const BYTE | HuffTableMask [39] |
static const BYTE | HuffLengthLEC [294] |
static const BYTE | HuffCodeLEC [588] |
static const BYTE | HuffLengthLOM [32] |
static const UINT16 | HuffCodeLOM [32] |
static const UINT32 | CopyOffsetBitsLUT [32] |
static const UINT32 | CopyOffsetBaseLUT [32] |
static const UINT32 | LOMBitsLUT [30] |
static const UINT32 | LOMBaseLUT [30] |
#define TAG FREERDP_TAG("codec") |
FreeRDP: A Remote Desktop Protocol Implementation NCrush (RDP6) Bulk Data Compression
Copyright 2014 Marc-Andre Moreau marca Copyright 2017 Armin Novak ndre .more au@g mail. comarmin Copyright 2017 Thincast Technologies GmbH .nov ak@th inca st.co m
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 ncrush_compress | ( | NCRUSH_CONTEXT * | ncrush, |
const BYTE * | pSrcData, | ||
UINT32 | SrcSize, | ||
BYTE * | pDstBuffer, | ||
const BYTE ** | ppDstData, | ||
UINT32 * | pDstSize, | ||
UINT32 * | pFlags | ||
) |
void ncrush_context_free | ( | NCRUSH_CONTEXT * | ncrush | ) |
NCRUSH_CONTEXT* ncrush_context_new | ( | BOOL | Compressor | ) |
void ncrush_context_reset | ( | NCRUSH_CONTEXT * | ncrush, |
BOOL | flush | ||
) |
int ncrush_decompress | ( | NCRUSH_CONTEXT * | ncrush, |
const BYTE * | pSrcData, | ||
UINT32 | SrcSize, | ||
const BYTE ** | ppDstData, | ||
UINT32 * | pDstSize, | ||
UINT32 | flags | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |