Exemplo n.º 1
0
void bulk_reset(rdpBulk* bulk)
{
    mppc_context_reset(bulk->mppcSend, FALSE);
    mppc_context_reset(bulk->mppcRecv, FALSE);
    ncrush_context_reset(bulk->ncrushRecv, FALSE);
    ncrush_context_reset(bulk->ncrushSend, FALSE);
    xcrush_context_reset(bulk->xcrushRecv, FALSE);
    xcrush_context_reset(bulk->xcrushSend, FALSE);
}
Exemplo n.º 2
0
void xcrush_context_reset(XCRUSH_CONTEXT* xcrush, BOOL flush)
{
	xcrush->SignatureIndex = 0;
	xcrush->SignatureCount = 1000;
	ZeroMemory(&(xcrush->Signatures), sizeof(XCRUSH_SIGNATURE) * xcrush->SignatureCount);

	xcrush->CompressionFlags = 0;

	xcrush->ChunkHead = xcrush->ChunkTail = 1;
	ZeroMemory(&(xcrush->Chunks), sizeof(xcrush->Chunks));
	ZeroMemory(&(xcrush->NextChunks), sizeof(xcrush->NextChunks));

	ZeroMemory(&(xcrush->OriginalMatches), sizeof(xcrush->OriginalMatches));
	ZeroMemory(&(xcrush->OptimizedMatches), sizeof(xcrush->OptimizedMatches));

	if (flush)
		xcrush->HistoryOffset = xcrush->HistoryBufferSize + 1;
	else
		xcrush->HistoryOffset = 0;

	mppc_context_reset(xcrush->mppc, flush);
}