📄 ph32.asm
字号:
MULTICOMPRESS=1
mov esi,pview
mov edi,pcomp_view
mov ecx,src_size
mov ebx,offset c_c1
mov edx,offset c_c2
call hC32_compress
mov cb_out,eax
cmp eax,src_size
ja error_compress_negative
inc GDD(cpd_passes)
add eax,128*1024 ;增加128KB工作区
mov pt_msize,eax
INVOKE VirtualAlloc,0,eax,MEM_COMMIT,PAGE_EXECUTE_READWRITE
JEAXZ error_alloc_fail
mov pt_Mem,eax
;-----------------------------------------
IF MULTICOMPRESS
look_for_best:
xor eax,eax
lea edi,c_c1
mov ecx,8
rep stosd ;clear counters
mov ecx,cb_out
mov esi,pcomp_view
mov edi,pt_Mem
mov ebx,offset c_c1
mov edx,offset c_c2
call hC32_compress
cmp eax,cb_out
jae no_compress_once_again
inc cpd_passes
mov cb_out,eax
mov esi,pt_Mem
mov edi,pcomp_view
mov ecx,eax
shr ecx,2
rep movsd
mov ecx,eax
and ecx,3
rep movsb
jmp look_for_best
no_compress_once_again:
ENDIF
INVOKE VirtualFree,pt_Mem,pt_msize,MEM_RELEASE
mov eax,src_size
sub eax,cb_out
INVOKE wsprintf,addr buf,CTEXT(13,10,"origin %d, new %d, %d Decreased,%d passes...."),src_size,cb_out,eax,cpd_passes
lea esi,buf
call write_con_string
mov esi,CTEXT("Ok...succeed...")
call write_con_string
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -