forked from KolibriOS/kolibrios
fix input limit 64 Kb
git-svn-id: svn://kolibrios.org@6704 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6b9749d66d
commit
fe94d7915b
@ -943,7 +943,7 @@ zlib_debug 'deflate strm = %d',ebx
|
||||
je .beg0
|
||||
cmp dword[ebx+z_stream.next_in],Z_NULL
|
||||
jne @f
|
||||
cmp word[ebx+z_stream.avail_in],0
|
||||
cmp dword[ebx+z_stream.avail_in],0
|
||||
jne .beg0
|
||||
@@:
|
||||
cmp dword[edi+deflate_state.status],FINISH_STATE
|
||||
@ -1338,7 +1338,7 @@ end if
|
||||
; returning Z_STREAM_END instead of Z_BUF_ERROR.
|
||||
jmp @f
|
||||
.end13:
|
||||
cmp word[ebx+z_stream.avail_in],0
|
||||
cmp dword[ebx+z_stream.avail_in],0
|
||||
jne @f
|
||||
RANK dword[old_flush],esi
|
||||
RANK dword[flush],eax
|
||||
@ -1353,7 +1353,7 @@ end if
|
||||
; User must not provide more input after the first FINISH:
|
||||
cmp dword[edi+deflate_state.status],FINISH_STATE
|
||||
jne @f
|
||||
cmp word[ebx+z_stream.avail_in],0
|
||||
cmp dword[ebx+z_stream.avail_in],0
|
||||
je @f ;if (..==.. && ..!=0)
|
||||
ERR_RETURN ebx, Z_BUF_ERROR
|
||||
jmp .end_f
|
||||
@ -1361,7 +1361,7 @@ end if
|
||||
|
||||
; Start a new block or continue the current one.
|
||||
|
||||
cmp word[ebx+z_stream.avail_in],0
|
||||
cmp dword[ebx+z_stream.avail_in],0
|
||||
jne @f
|
||||
cmp dword[edi+deflate_state.lookahead],0
|
||||
jne @f
|
||||
@ -1662,7 +1662,7 @@ endp
|
||||
align 4
|
||||
proc read_buf uses ebx ecx, strm:dword, buf:dword, size:dword
|
||||
mov ebx,[strm]
|
||||
movzx eax,word[ebx+z_stream.avail_in]
|
||||
mov eax,[ebx+z_stream.avail_in]
|
||||
|
||||
cmp eax,[size]
|
||||
jle @f ;if (..>..)
|
||||
@ -1674,7 +1674,7 @@ proc read_buf uses ebx ecx, strm:dword, buf:dword, size:dword
|
||||
jmp .end_f ;if (..==0) return 0
|
||||
@@:
|
||||
|
||||
sub [ebx+z_stream.avail_in],ax
|
||||
sub [ebx+z_stream.avail_in],eax
|
||||
|
||||
stdcall zmemcpy, [buf],[ebx+z_stream.next_in],eax
|
||||
mov ecx,[ebx+z_stream.state]
|
||||
@ -2078,7 +2078,7 @@ end if
|
||||
pop ecx ebx
|
||||
add ebx,ecx
|
||||
.end0:
|
||||
cmp word[edx+z_stream.avail_in],0
|
||||
cmp dword[edx+z_stream.avail_in],0
|
||||
je .cycle0end ;if (..==0) break
|
||||
|
||||
; If there was no sliding:
|
||||
@ -2157,7 +2157,7 @@ end if
|
||||
|
||||
cmp dword[edi+deflate_state.lookahead],MIN_LOOKAHEAD
|
||||
jge .cycle0end
|
||||
cmp word[edx+z_stream.avail_in],0
|
||||
cmp dword[edx+z_stream.avail_in],0
|
||||
jne .cycle0
|
||||
.cycle0end: ;while (..<.. && ..!=..)
|
||||
|
||||
|
@ -162,7 +162,7 @@ test_code:
|
||||
mov eax,my_strm
|
||||
mov [eax+z_stream.next_in],m0 ;ãáâ ¢«¨¢ ¥¬ ¯ ¬ïâì ¤«ï ᦠâ¨ï
|
||||
mov ecx,[m0size]
|
||||
mov word[eax+z_stream.avail_in],cx ;à §¬¥à ᦨ¬ ¥¬ë¦ ¤ ëå
|
||||
mov [eax+z_stream.avail_in],ecx ;à §¬¥à ᦨ¬ ¥¬ë¦ ¤ ëå
|
||||
mov [eax+z_stream.next_out],m1 ;ãáâ ¢«¨¢ ¥¬ ¡ãä¥à ¤«ï ᦠâ¨ï
|
||||
mov word[eax+z_stream.avail_out],1024 ;à §¬¥à ¡ãä¥à ¤«ï ᦠâ¨ï (¬ ªá¨¬ã¬ 16 Š¡)
|
||||
|
||||
|
@ -72,7 +72,7 @@ ZLIB_VER_SUBREVISION equ 0
|
||||
|
||||
struct z_stream ;z_stream_s
|
||||
next_in dd ? ;z_const Bytef * ;next input byte
|
||||
avail_in dw ? ;uInt ;number of bytes available at next_in
|
||||
avail_in dd ? ;uInt ;number of bytes available at next_in
|
||||
total_in dd ? ;uLong ;total number of input bytes read so far
|
||||
|
||||
next_out dd ? ;Bytef * ;next output byte should be put there
|
||||
|
Loading…
Reference in New Issue
Block a user