Created
April 29, 2014 18:48
-
-
Save samdmarshall/11408672 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ((len>pfile_in_zip_read_info->rest_read_uncompressed) && | |
(!(pfile_in_zip_read_info->raw))) | |
pfile_in_zip_read_info->stream.avail_out = | |
(uInt)pfile_in_zip_read_info->rest_read_uncompressed; | |
if ((len>pfile_in_zip_read_info->rest_read_compressed+ | |
pfile_in_zip_read_info->stream.avail_in) && | |
(pfile_in_zip_read_info->raw)) | |
pfile_in_zip_read_info->stream.avail_out = | |
(uInt)pfile_in_zip_read_info->rest_read_compressed+ | |
pfile_in_zip_read_info->stream.avail_in; | |
while (pfile_in_zip_read_info->stream.avail_out>0) | |
{ | |
if ((pfile_in_zip_read_info->stream.avail_in==0) && | |
(pfile_in_zip_read_info->rest_read_compressed>0)) | |
{ | |
uInt uReadThis = UNZ_BUFSIZE; | |
if (pfile_in_zip_read_info->rest_read_compressed<uReadThis) | |
uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed; | |
if (uReadThis == 0) | |
return UNZ_EOF; | |
if (ZSEEK(pfile_in_zip_read_info->z_filefunc, | |
pfile_in_zip_read_info->filestream, | |
pfile_in_zip_read_info->pos_in_zipfile + | |
pfile_in_zip_read_info->byte_before_the_zipfile, | |
ZLIB_FILEFUNC_SEEK_SET)!=0) | |
return UNZ_ERRNO; | |
if (ZREAD(pfile_in_zip_read_info->z_filefunc, | |
pfile_in_zip_read_info->filestream, | |
pfile_in_zip_read_info->read_buffer, | |
uReadThis)!=uReadThis) | |
return UNZ_ERRNO; | |
# ifndef NOUNCRYPT | |
if(s->encrypted) | |
{ | |
uInt i; | |
for(i=0;i<uReadThis;i++) | |
pfile_in_zip_read_info->read_buffer[i] = | |
zdecode(s->keys,s->pcrc_32_tab, | |
pfile_in_zip_read_info->read_buffer[i]); | |
} | |
# endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment