Lines Matching refs:pfile_in_zip_read_info
1057 file_in_zip_read_info_s* pfile_in_zip_read_info;
1080 pfile_in_zip_read_info = (file_in_zip_read_info_s*)
1082 if (pfile_in_zip_read_info==NULL)
1085 pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE);
1086 pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
1087 pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
1088 pfile_in_zip_read_info->pos_local_extrafield=0;
1089 pfile_in_zip_read_info->raw=raw;
1091 if (pfile_in_zip_read_info->read_buffer==NULL)
1093 TRYFREE(pfile_in_zip_read_info);
1097 pfile_in_zip_read_info->stream_initialised=0;
1117 pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
1118 pfile_in_zip_read_info->crc32=0;
1119 pfile_in_zip_read_info->compression_method =
1121 pfile_in_zip_read_info->filestream=s->filestream;
1122 pfile_in_zip_read_info->z_filefunc=s->z_filefunc;
1123 pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;
1125 pfile_in_zip_read_info->stream.total_out = 0;
1130 pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
1131 pfile_in_zip_read_info->stream.zfree = (free_func)0;
1132 pfile_in_zip_read_info->stream.opaque = (voidpf)0;
1133 pfile_in_zip_read_info->stream.next_in = (voidpf)0;
1134 pfile_in_zip_read_info->stream.avail_in = 0;
1136 err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
1138 pfile_in_zip_read_info->stream_initialised=1;
1141 TRYFREE(pfile_in_zip_read_info);
1152 pfile_in_zip_read_info->rest_read_compressed =
1154 pfile_in_zip_read_info->rest_read_uncompressed =
1158 pfile_in_zip_read_info->pos_in_zipfile =
1162 pfile_in_zip_read_info->stream.avail_in = (uInt)0;
1164 s->pfile_in_zip_read = pfile_in_zip_read_info;
1232 file_in_zip_read_info_s* pfile_in_zip_read_info;
1236 pfile_in_zip_read_info=s->pfile_in_zip_read;
1238 if (pfile_in_zip_read_info==NULL)
1242 if ((pfile_in_zip_read_info->read_buffer == NULL))
1247 pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;
1249 pfile_in_zip_read_info->stream.avail_out = (uInt)len;
1251 if ((len>pfile_in_zip_read_info->rest_read_uncompressed) &&
1252 (!(pfile_in_zip_read_info->raw)))
1253 pfile_in_zip_read_info->stream.avail_out =
1254 (uInt)pfile_in_zip_read_info->rest_read_uncompressed;
1256 if ((len>pfile_in_zip_read_info->rest_read_compressed+
1257 pfile_in_zip_read_info->stream.avail_in) &&
1258 (pfile_in_zip_read_info->raw))
1259 pfile_in_zip_read_info->stream.avail_out =
1260 (uInt)pfile_in_zip_read_info->rest_read_compressed+
1261 pfile_in_zip_read_info->stream.avail_in;
1263 while (pfile_in_zip_read_info->stream.avail_out>0)
1265 if ((pfile_in_zip_read_info->stream.avail_in==0) &&
1266 (pfile_in_zip_read_info->rest_read_compressed>0))
1269 if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)
1270 uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
1273 if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
1274 pfile_in_zip_read_info->filestream,
1275 pfile_in_zip_read_info->pos_in_zipfile +
1276 pfile_in_zip_read_info->byte_before_the_zipfile,
1279 if (ZREAD(pfile_in_zip_read_info->z_filefunc,
1280 pfile_in_zip_read_info->filestream,
1281 pfile_in_zip_read_info->read_buffer,
1291 pfile_in_zip_read_info->read_buffer[i] =
1293 pfile_in_zip_read_info->read_buffer[i]);
1298 pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
1300 pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
1302 pfile_in_zip_read_info->stream.next_in =
1303 (Bytef*)pfile_in_zip_read_info->read_buffer;
1304 pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
1307 if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw))
1311 if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
1312 (pfile_in_zip_read_info->rest_read_compressed == 0))
1315 if (pfile_in_zip_read_info->stream.avail_out <
1316 pfile_in_zip_read_info->stream.avail_in)
1317 uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
1319 uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
1322 *(pfile_in_zip_read_info->stream.next_out+i) =
1323 *(pfile_in_zip_read_info->stream.next_in+i);
1325 pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
1326 pfile_in_zip_read_info->stream.next_out,
1328 pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
1329 pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
1330 pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
1331 pfile_in_zip_read_info->stream.next_out += uDoCopy;
1332 pfile_in_zip_read_info->stream.next_in += uDoCopy;
1333 pfile_in_zip_read_info->stream.total_out += uDoCopy;
1343 uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
1344 bufBefore = pfile_in_zip_read_info->stream.next_out;
1347 if ((pfile_in_zip_read_info->rest_read_uncompressed ==
1348 pfile_in_zip_read_info->stream.avail_out) &&
1349 (pfile_in_zip_read_info->rest_read_compressed == 0))
1352 err=inflate(&pfile_in_zip_read_info->stream,flush);
1354 if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL))
1357 uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
1360 pfile_in_zip_read_info->crc32 =
1361 crc32(pfile_in_zip_read_info->crc32,bufBefore,
1364 pfile_in_zip_read_info->rest_read_uncompressed -=
1389 file_in_zip_read_info_s* pfile_in_zip_read_info;
1393 pfile_in_zip_read_info=s->pfile_in_zip_read;
1395 if (pfile_in_zip_read_info==NULL)
1398 return (z_off_t)pfile_in_zip_read_info->stream.total_out;
1409 file_in_zip_read_info_s* pfile_in_zip_read_info;
1413 pfile_in_zip_read_info=s->pfile_in_zip_read;
1415 if (pfile_in_zip_read_info==NULL)
1418 if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
1444 file_in_zip_read_info_s* pfile_in_zip_read_info;
1451 pfile_in_zip_read_info=s->pfile_in_zip_read;
1453 if (pfile_in_zip_read_info==NULL)
1456 size_to_read = (pfile_in_zip_read_info->size_local_extrafield -
1457 pfile_in_zip_read_info->pos_local_extrafield);
1470 if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
1471 pfile_in_zip_read_info->filestream,
1472 pfile_in_zip_read_info->offset_local_extrafield +
1473 pfile_in_zip_read_info->pos_local_extrafield,
1477 if (ZREAD(pfile_in_zip_read_info->z_filefunc,
1478 pfile_in_zip_read_info->filestream,
1495 file_in_zip_read_info_s* pfile_in_zip_read_info;
1499 pfile_in_zip_read_info=s->pfile_in_zip_read;
1501 if (pfile_in_zip_read_info==NULL)
1505 if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) &&
1506 (!pfile_in_zip_read_info->raw))
1508 if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
1513 TRYFREE(pfile_in_zip_read_info->read_buffer);
1514 pfile_in_zip_read_info->read_buffer = NULL;
1515 if (pfile_in_zip_read_info->stream_initialised)
1516 inflateEnd(&pfile_in_zip_read_info->stream);
1518 pfile_in_zip_read_info->stream_initialised = 0;
1519 TRYFREE(pfile_in_zip_read_info);