亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rle.c

?? vc 開發經典
?? C
字號:
// Run Length 編碼解碼函數集
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include "RLE.h"
#include "Server.h"

DWORD	dwCodeLength = 19;

DWORD RunLength(BYTE *pInput,DWORD dwCount)
{
	DWORD	dwNewCount = 4;
	DWORD	dwMaxRun;
	DWORD	dwUnusedByte = 0;
	BOOL	fOutput = FALSE;

	__asm
	{
		MOV		EDX,1
		MOV		ECX,dwCodeLength
		SUB		ECX,9
		SHL		EDX,CL
		SUB		EDX,1
		MOV		dwMaxRun,EDX

		MOV		EDX,dwCount

		XOR		EDI,EDI

		XOR		ESI,ESI

		_LoadByte:

		PUSH	ESI

		MOV		ESI,pInput
		MOV		AL,[ESI]

		MOV		ECX,DWORD PTR 1

		_CompareBytes:

		CMP		EDX,0
		JZ		_Finished

		CMP		ECX,dwMaxRun
		JA		_Finished

		CMP		AL,[ESI + ECX]

		LEA		ECX,[ECX + 1]

		LEA		EDX,[EDX - 1]

		JE		_CompareBytes

		_Finished:

		DEC		ECX

		ADD		ESI,ECX
		MOV		pInput,ESI

		POP		ESI

		CMP		ECX,1
		JNZ		_BuildCode

		XOR		EBX,EBX
		MOV		BH,1
		MOV		BL,AL

		MOV		ECX,9

		JMP		_CheckShift

		_BuildCode:
		MOV		EBX,ECX
		SHL		EBX,8
		MOV		BL,AL

		MOV		ECX,dwCodeLength

		_CheckShift:
		ADD		EDI,ECX
		CMP		EDI,32
		JLE		_ShiftData

		SUB		EDI,32

		SUB		ECX,EDI

		MOV		dwUnusedByte,EBX

		PUSH	ECX
		MOV		ECX,EDI
		SHR		EBX,CL
		POP		ECX

		// Set the Output Flag
		MOV		fOutput,TRUE

		// Shift the Output Data
		_ShiftData:

		// Shift the Output Symbol to Handle a New Symbol
		SHL		ESI,CL

		// OR the Output Symbol with New Symbol
		OR		ESI,EBX

		// Check for Outputting a full DWORD
		CMP		fOutput,FALSE
		JE		_Continue

		// Increment the Compression Count
		ADD		dwNewCount,4

		// Remove the Bits we Used
		MOV		EAX,32
		SUB		EAX,EDI
		MOV		ECX,EAX

		// Restore the Unused Portion of the Code
		MOV		EAX,dwUnusedByte
		SHL		EAX,CL
		SHR		EAX,CL

		// Update the Code to Have the Left Over Bits
		MOV		ESI,EAX

		// Initialize the Left Over Bits
		MOV		dwUnusedByte,0

		// Reset the Output Flag
		MOV		fOutput,FALSE

		// Compare for More Data
		_Continue:
		CMP		EDX,0
		JZ		_Exit

		// Go Back for More Bytes
		JMP		_LoadByte

		// Finished Encoding
		_Exit:

		// Update Any Remaining Compression data in the Buffer
		CMP		EDI,0
		JE		_Done

		// Left Shift the Remaining Bits
		MOV		EAX,32
		SUB		EAX,EDI
		MOV		ECX,EAX
		SHL		ESI,CL

		// Increment the Compression Count
		ADD		dwNewCount,4

		// Done Encoding
		_Done:
	}

	// Return the Compressed Count
	return dwNewCount;
}

// Run Length Encode the Input Data to the Output Data
DWORD RunLengthEncode(BYTE *pInput,DWORD dwCount,BYTE *pOutput)
{
	// Compressed Count
	DWORD	dwNewCount = 4;

	// Variables Used for Code Shifting
	DWORD	dwUnusedByte = 0;
	BOOL	fOutput = FALSE;

	// Max Run Length
	DWORD	dwMaxRun;

	__asm
	{
		// Calculate the Maximum Run Length
		MOV		EDX,1
		MOV		ECX,dwCodeLength
		SUB		ECX,9
		SHL		EDX,CL
		SUB		EDX,1
		MOV		dwMaxRun,EDX

		// Point to the Input Byte
		MOV		EDI,pOutput

		// Load the Count of Bytes to Encode
		MOV		EDX,dwCount

		// Store the Original Length in the Compressed Data
		MOV		[EDI],EDX

		// Increment the Input Data Pointer
		ADD		EDI,4
		MOV		pOutput,EDI

		// Initialize the Output Bits
		XOR		EDI,EDI

		// Initialize the Storage DWORD
		XOR		ESI,ESI

		// Load the Byte to Compare
		_LoadByte:

		// Save the Storage DWORD
		PUSH	ESI

		// Load a Byte
		MOV		ESI,pInput
		MOV		AL,[ESI]

		// Initialize the Run Length Count to 1
		MOV		ECX,DWORD PTR 1

		// Compare the Bytes
		_CompareBytes:

		// Check for EOD
		CMP		EDX,0
		JZ		_Finished

		// Compare to the Max Length for an Encode
		CMP		ECX,dwMaxRun
		JA		_Finished

		// Compare the Bytes
		CMP		AL,[ESI + ECX]

		// Increment the Run Length
		LEA		ECX,[ECX + 1]

		// Decrement the Bytes Processed
		LEA		EDX,[EDX - 1]

		// Branch for the Comparison
		JE		_CompareBytes

		// Finished Encoding
		_Finished:

		// Decrement the Run Length for Encoding
		DEC		ECX

		// Increment the Pointer to the Source Data
		ADD		ESI,ECX
		MOV		pInput,ESI

		// Restore the Storage DWORD
		POP		ESI

		// Check for a 1:1 Character Copy
		CMP		ECX,1
		JNZ		_BuildCode

		// Move in the Character
		XOR		EBX,EBX
		MOV		BH,1
		MOV		BL,AL

		// Set the Code Length
		MOV		ECX,9

		// Jump to Checking the Bit Shifting
		JMP		_CheckShift

		// Build the Compression Code
		_BuildCode:
		MOV		EBX,ECX
		SHL		EBX,8
		MOV		BL,AL

		// Set the Code Length
		MOV		ECX,dwCodeLength

		// See How Many Bits Can be Shifted to the Output DWORD
		_CheckShift:
		ADD		EDI,ECX
		CMP		EDI,32
		JLE		_ShiftData

		// See How Many Bits of the Last Code Can't Be Used
		SUB		EDI,32

		// Adjust ECX to Handle only the Bits that Can Be Used
		SUB		ECX,EDI

		// Save the Code
		MOV		dwUnusedByte,EBX

		// Shift the Input Symbol to the Right
		PUSH	ECX
		MOV		ECX,EDI
		SHR		EBX,CL
		POP		ECX

		// Set the Output Flag
		MOV		fOutput,TRUE

		// Shift the Output Data
		_ShiftData:

		// Shift the Output Symbol to Handle a New Symbol
		SHL		ESI,CL

		// OR the Output Symbol with New Symbol
		OR		ESI,EBX

		// Check for Outputting a full DWORD
		CMP		fOutput,FALSE
		JE		_Continue

		// Output an Encoded Symbol
		MOV		EAX,ESI
		PUSH	EDI
		MOV		EDI,pOutput
		MOV		[EDI],EAX
		ADD		EDI,4
		MOV		pOutput,EDI
		POP		EDI

		// Increment the Compression Count
		ADD		dwNewCount,4

		// Remove the Bits we Used
		MOV		EAX,32
		SUB		EAX,EDI
		MOV		ECX,EAX

		// Restore the Unused Portion of the Code
		MOV		EAX,dwUnusedByte
		SHL		EAX,CL
		SHR		EAX,CL

		// Update the Code to Have the Left Over Bits
		MOV		ESI,EAX

		// Initialize the Left Over Bits
		MOV		dwUnusedByte,0

		// Reset the Output Flag
		MOV		fOutput,FALSE

		// Compare for More Data
		_Continue:
		CMP		EDX,0
		JZ		_Exit

		// Go Back for More Bytes
		JMP		_LoadByte

		// Finished Encoding
		_Exit:

		// Update Any Remaining Compression data in the Buffer
		CMP		EDI,0
		JE		_Done

		// Left Shift the Remaining Bits
		MOV		EAX,32
		SUB		EAX,EDI
		MOV		ECX,EAX
		SHL		ESI,CL

		// Output the Final Encoded Symbol
		MOV		EAX,ESI
		MOV		EDI,pOutput
		MOV		[EDI],EAX

		// Increment the Compression Count
		ADD		dwNewCount,4

		// Done Encoding
		_Done:
	}

	// Return the Compressed Count
	return dwNewCount;
}

// Run Length Decode the Input Data to the Output Data
DWORD RunLengthDecode(BYTE *pInput,BYTE *pOutput)
{
	// Compressed Count
	DWORD	dwCount;
	DWORD	dwCompCount;
	DWORD	dwCodeLength2;

	__asm
	{
		// Get the CodeLength - 1 for Checking a 1:1 Compression
		MOV		EAX,dwCodeLength
		DEC		EAX
		MOV		dwCodeLength2,EAX

		// Point to the Input Byte
		MOV		ESI,pInput

		// Point to the Output Byte
		MOV		EDI,pOutput

		// Load the Count of Bytes Encoded
		LODSD

		// Save the New Input Location
		MOV		pInput,ESI

		// Save the Count of the UnCompressed Data
		MOV		dwCompCount,EAX

		// Initialize the Count of Bytes Decoded
		MOV		dwCount,EAX

		// Initialize Number of Bits for Current Symbol to Process
		MOV		ESI,dwCodeLength

		// Initialize the Decode Storage
		XOR		EDX,EDX

		// Main Loop for Reading Input
		_LoopInput:

		// Save the Number of Bits for the Current Symbol
		PUSH	ESI

		// Point to the Input Data
		MOV		ESI,pInput

		// Read an Encoded DWORD
		LODSD

		// Save the Pointer to the Input Data
		MOV		pInput,ESI

		// Restore the Number of Bits for the Current Symbol
		POP		ESI

		// Initialize Number of Bits to Process
		MOV		EBX,32

		// Shift in an Encoded Symbol, 1 bit at a time
		_LeftShift:

		// Shift 1 Bit of the Input Code to the Output
		SHLD	EDX,EAX,1

		// Shift the Input Code 1 Bit to the Left
		SHL		EAX,1

		// Decrement the Number of Bits Processed
		DEC		ESI

		// Check for a Fully Encoded Symbol
		JZ		_Output

		// Compare the High Bit for RLE or Character Encode
		CMP		ESI,dwCodeLength2
		JNZ		_CheckBits

		// Compare the High Bit, 0 = RLE, 1 = 1:1 Character Encode
		CMP		EDX,0
		JZ		_CheckBits

		// Update the Bits Left to 8
		MOV		ESI,8

		// Check for More Bits to Process
		_CheckBits:

		// Decrement the Number of Bits Processed in the Input DWORD
		DEC		EBX

		// Continue Shifting More Bits
		JNZ		_LeftShift

		// Read Another DWORD of Data
		JMP		_LoopInput

		// Output the Run Length Amount of the Code
		_Output:

		// Get the Run Length
		MOV		ECX,EDX
		SHR		ECX,8

		// Get the Code
		AND		EDX,255

		// Save the Input DWORD
		PUSH	EAX

		// Copy the Code
		MOV		EAX,EDX

		// Save the Run Length
		PUSH	ECX

		// Output the Run Length Amount of the Code
		REP		STOSB

		// Restore the Run Length
		POP		ECX

		// Restore the Input DWORD
		POP		EAX

		// Check for More Data to Decode
		SUB		dwCompCount,ECX
		JZ		_Exit

		// Initialize the Decode Storage
		XOR		EDX,EDX

		// Initialize Number of Bits for Current Symbol to Process
		MOV		ESI,dwCodeLength

		// Check for More Bits to Process
		JMP		_CheckBits

		// Finished
		_Exit:
	}

	// Return the Count of Uncompressed Data
	return dwCount;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区91| 亚洲一区二区精品视频| 亚洲人精品午夜| 亚洲电影一区二区| av一区二区三区在线| 88在线观看91蜜桃国自产| 亚洲国产高清aⅴ视频| 石原莉奈在线亚洲二区| 成人av小说网| 久久久国产精品麻豆| 日本在线不卡一区| 欧美性欧美巨大黑白大战| 亚洲同性同志一二三专区| 国产麻豆91精品| 精品欧美一区二区久久| 污片在线观看一区二区| 色综合天天综合网天天狠天天 | 色婷婷激情一区二区三区| 久久综合久久久久88| 日韩一区精品字幕| 色综合天天综合色综合av| 欧美国产一区二区在线观看| 蓝色福利精品导航| 欧美一区二区大片| 日韩福利电影在线观看| 精品视频在线免费| 一区二区三区加勒比av| av成人老司机| 亚洲欧美综合另类在线卡通| 懂色av中文字幕一区二区三区| 2024国产精品| 国产美女精品一区二区三区| 亚洲精品在线观| 国产在线播放一区二区三区| 久久九九久久九九| 成人性生交大片免费| 中文字幕二三区不卡| 成人精品视频.| 亚洲精选一二三| 日本精品视频一区二区| 亚洲大片精品永久免费| 欧美日本乱大交xxxxx| 视频一区中文字幕| 日韩欧美国产一区在线观看| 久久99日本精品| 欧美韩国日本一区| 一本一本大道香蕉久在线精品| 亚洲精品中文字幕乱码三区| 欧美三级电影网| 麻豆成人91精品二区三区| 精品粉嫩aⅴ一区二区三区四区| 国产一区在线视频| 国产精品久久久久影院| 欧美日韩视频一区二区| 国产主播一区二区| 亚洲色图欧美激情| 91麻豆精品国产91久久久久久| 免费亚洲电影在线| 国产精品美女视频| 欧美三级一区二区| 国产一区久久久| 亚洲精品高清在线| 精品国产麻豆免费人成网站| 成人av在线看| 日本三级韩国三级欧美三级| 国产午夜精品一区二区三区视频| 色94色欧美sute亚洲线路二| 美女视频一区二区三区| 中文字幕在线免费不卡| 欧美剧在线免费观看网站 | 99视频热这里只有精品免费| 亚洲线精品一区二区三区八戒| 日韩欧美的一区| 91小视频在线免费看| 美国十次综合导航| 亚洲综合一区二区| 久久婷婷成人综合色| 欧美嫩在线观看| 成人app软件下载大全免费| 日本视频在线一区| 亚洲美腿欧美偷拍| 国产精品免费免费| 精品少妇一区二区三区视频免付费| 91免费观看视频| 国产精品自产自拍| 麻豆成人免费电影| 亚洲午夜久久久久久久久久久| 久久久亚洲国产美女国产盗摄| 欧美片在线播放| 91天堂素人约啪| 国产成人精品aa毛片| 精品亚洲欧美一区| 日韩一区精品视频| 亚洲综合久久久| 亚洲三级理论片| 日本一区二区三区免费乱视频| 欧美一区二区三区免费| 欧美日韩一二三| 欧美日本高清视频在线观看| 在线观看成人小视频| 色综合中文字幕国产| 韩国午夜理伦三级不卡影院| 日韩av电影免费观看高清完整版| 亚洲激情一二三区| 亚洲天堂免费在线观看视频| 中文字幕不卡一区| 久久精品一区四区| 欧美韩国一区二区| 国产精品久久久久影院| 国产精品国产a级| 中文字幕av不卡| 欧美高清在线视频| 中文字幕中文在线不卡住| 国产精品免费丝袜| 亚洲欧美另类小说视频| 亚洲另类色综合网站| 亚洲一区二区三区四区五区中文| 亚洲欧美日韩中文字幕一区二区三区 | 99久久婷婷国产| av电影在线观看完整版一区二区| yourporn久久国产精品| 色综合久久综合网欧美综合网| 一本一本大道香蕉久在线精品| 欧美在线免费播放| 欧美精品123区| 337p日本欧洲亚洲大胆色噜噜| 久久精品一区二区三区不卡 | 2021国产精品久久精品| 国产丝袜在线精品| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 国产aⅴ综合色| 成人黄页毛片网站| 一本到三区不卡视频| 9191久久久久久久久久久| 亚洲精品一区二区三区蜜桃下载| 精品少妇一区二区三区在线视频| 欧美国产综合色视频| 一区二区三区成人| 免费成人av在线| 国产成人午夜精品5599| 91麻豆6部合集magnet| 欧美精品视频www在线观看| 欧美大片免费久久精品三p| 国产亲近乱来精品视频 | 经典一区二区三区| 丁香婷婷综合色啪| 欧美性极品少妇| 精品av综合导航| 亚洲欧美成人一区二区三区| 视频在线在亚洲| 成人午夜电影网站| 欧美日本一区二区三区| 亚洲国产经典视频| 三级影片在线观看欧美日韩一区二区| 黄色精品一二区| 91麻豆国产精品久久| 欧美一区二区三区在线观看视频 | 成人精品视频一区| 欧美一区日本一区韩国一区| 国产亚洲1区2区3区| 亚洲成人在线网站| 成人av网站在线观看| 538在线一区二区精品国产| 国产无遮挡一区二区三区毛片日本| 亚洲va天堂va国产va久| 国产91精品精华液一区二区三区| 欧美猛男gaygay网站| 国产精品乱码一区二区三区软件 | 亚洲综合免费观看高清在线观看| 国产美女久久久久| 欧美日韩中文一区| 成人欧美一区二区三区白人| 麻豆91精品91久久久的内涵| 欧美在线制服丝袜| 亚洲丝袜精品丝袜在线| 国产高清久久久| 欧美一级久久久| 石原莉奈在线亚洲二区| 色综合av在线| 亚洲欧美视频在线观看视频| 国产suv精品一区二区883| 日韩片之四级片| 日韩国产在线观看一区| 欧美性生活一区| 亚洲免费观看高清完整版在线观看| 岛国一区二区三区| 国产偷国产偷精品高清尤物| 久久99精品久久久久久国产越南 | 久久精品久久99精品久久| 欧美日韩午夜在线视频| 亚洲国产精品嫩草影院| 日本精品一级二级| 亚洲午夜免费福利视频| 欧美日韩五月天| 日韩在线一区二区三区| 日韩网站在线看片你懂的| 日韩av一级片| 日韩欧美一区在线观看| 蜜桃视频一区二区三区在线观看| 日韩一区二区在线观看视频播放|