Lines Matching refs:pfile_in_zip_read_info
1478 file_in_zip64_read_info_s* pfile_in_zip_read_info;
1500 pfile_in_zip_read_info = (file_in_zip64_read_info_s*)ALLOC(sizeof(file_in_zip64_read_info_s));
1501 if (pfile_in_zip_read_info==NULL)
1504 pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE);
1505 pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
1506 pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
1507 pfile_in_zip_read_info->pos_local_extrafield=0;
1508 pfile_in_zip_read_info->raw=raw;
1510 if (pfile_in_zip_read_info->read_buffer==NULL)
1512 TRYFREE(pfile_in_zip_read_info);
1516 pfile_in_zip_read_info->stream_initialised=0;
1540 pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
1541 pfile_in_zip_read_info->crc32=0;
1542 pfile_in_zip_read_info->total_out_64=0;
1543 pfile_in_zip_read_info->compression_method = s->cur_file_info.compression_method;
1544 pfile_in_zip_read_info->filestream=s->filestream;
1545 pfile_in_zip_read_info->z_filefunc=s->z_filefunc;
1546 pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;
1548 pfile_in_zip_read_info->stream.total_out = 0;
1553 pfile_in_zip_read_info->bstream.bzalloc = (void *(*) (void *, int, int))0;
1554 pfile_in_zip_read_info->bstream.bzfree = (free_func)0;
1555 pfile_in_zip_read_info->bstream.opaque = (voidpf)0;
1556 pfile_in_zip_read_info->bstream.state = (voidpf)0;
1558 pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
1559 pfile_in_zip_read_info->stream.zfree = (free_func)0;
1560 pfile_in_zip_read_info->stream.opaque = (voidpf)0;
1561 pfile_in_zip_read_info->stream.next_in = (voidpf)0;
1562 pfile_in_zip_read_info->stream.avail_in = 0;
1564 err=BZ2_bzDecompressInit(&pfile_in_zip_read_info->bstream, 0, 0);
1566 pfile_in_zip_read_info->stream_initialised=Z_BZIP2ED;
1569 TRYFREE(pfile_in_zip_read_info);
1573 pfile_in_zip_read_info->raw=1;
1578 pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
1579 pfile_in_zip_read_info->stream.zfree = (free_func)0;
1580 pfile_in_zip_read_info->stream.opaque = (voidpf)0;
1581 pfile_in_zip_read_info->stream.next_in = 0;
1582 pfile_in_zip_read_info->stream.avail_in = 0;
1584 err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
1586 pfile_in_zip_read_info->stream_initialised=Z_DEFLATED;
1589 TRYFREE(pfile_in_zip_read_info);
1600 pfile_in_zip_read_info->rest_read_compressed =
1602 pfile_in_zip_read_info->rest_read_uncompressed =
1606 pfile_in_zip_read_info->pos_in_zipfile =
1610 pfile_in_zip_read_info->stream.avail_in = (uInt)0;
1612 s->pfile_in_zip_read = pfile_in_zip_read_info;
1661 file_in_zip64_read_info_s* pfile_in_zip_read_info;
1665 pfile_in_zip_read_info=s->pfile_in_zip_read;
1666 if (pfile_in_zip_read_info==NULL)
1668 return pfile_in_zip_read_info->pos_in_zipfile +
1669 pfile_in_zip_read_info->byte_before_the_zipfile;
1689 file_in_zip64_read_info_s* pfile_in_zip_read_info;
1693 pfile_in_zip_read_info=s->pfile_in_zip_read;
1695 if (pfile_in_zip_read_info==NULL)
1699 if (pfile_in_zip_read_info->read_buffer == NULL)
1704 pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;
1706 pfile_in_zip_read_info->stream.avail_out = (uInt)len;
1708 if ((len>pfile_in_zip_read_info->rest_read_uncompressed) &&
1709 (!(pfile_in_zip_read_info->raw)))
1710 pfile_in_zip_read_info->stream.avail_out =
1711 (uInt)pfile_in_zip_read_info->rest_read_uncompressed;
1713 if ((len>pfile_in_zip_read_info->rest_read_compressed+
1714 pfile_in_zip_read_info->stream.avail_in) &&
1715 (pfile_in_zip_read_info->raw))
1716 pfile_in_zip_read_info->stream.avail_out =
1717 (uInt)pfile_in_zip_read_info->rest_read_compressed+
1718 pfile_in_zip_read_info->stream.avail_in;
1720 while (pfile_in_zip_read_info->stream.avail_out>0)
1722 if ((pfile_in_zip_read_info->stream.avail_in==0) &&
1723 (pfile_in_zip_read_info->rest_read_compressed>0))
1726 if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)
1727 uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
1730 if (ZSEEK64(pfile_in_zip_read_info->z_filefunc,
1731 pfile_in_zip_read_info->filestream,
1732 pfile_in_zip_read_info->pos_in_zipfile +
1733 pfile_in_zip_read_info->byte_before_the_zipfile,
1736 if (ZREAD64(pfile_in_zip_read_info->z_filefunc,
1737 pfile_in_zip_read_info->filestream,
1738 pfile_in_zip_read_info->read_buffer,
1748 pfile_in_zip_read_info->read_buffer[i] =
1750 pfile_in_zip_read_info->read_buffer[i]);
1755 pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
1757 pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
1759 pfile_in_zip_read_info->stream.next_in =
1760 (Bytef*)pfile_in_zip_read_info->read_buffer;
1761 pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
1764 if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw))
1768 if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
1769 (pfile_in_zip_read_info->rest_read_compressed == 0))
1772 if (pfile_in_zip_read_info->stream.avail_out <
1773 pfile_in_zip_read_info->stream.avail_in)
1774 uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
1776 uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
1779 *(pfile_in_zip_read_info->stream.next_out+i) =
1780 *(pfile_in_zip_read_info->stream.next_in+i);
1782 pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uDoCopy;
1784 pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
1785 pfile_in_zip_read_info->stream.next_out,
1787 pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
1788 pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
1789 pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
1790 pfile_in_zip_read_info->stream.next_out += uDoCopy;
1791 pfile_in_zip_read_info->stream.next_in += uDoCopy;
1792 pfile_in_zip_read_info->stream.total_out += uDoCopy;
1795 else if (pfile_in_zip_read_info->compression_method==Z_BZIP2ED)
1802 pfile_in_zip_read_info->bstream.next_in = (char*)pfile_in_zip_read_info->stream.next_in;
1803 pfile_in_zip_read_info->bstream.avail_in = pfile_in_zip_read_info->stream.avail_in;
1804 pfile_in_zip_read_info->bstream.total_in_lo32 = pfile_in_zip_read_info->stream.total_in;
1805 pfile_in_zip_read_info->bstream.total_in_hi32 = 0;
1806 pfile_in_zip_read_info->bstream.next_out = (char*)pfile_in_zip_read_info->stream.next_out;
1807 pfile_in_zip_read_info->bstream.avail_out = pfile_in_zip_read_info->stream.avail_out;
1808 pfile_in_zip_read_info->bstream.total_out_lo32 = pfile_in_zip_read_info->stream.total_out;
1809 pfile_in_zip_read_info->bstream.total_out_hi32 = 0;
1811 uTotalOutBefore = pfile_in_zip_read_info->bstream.total_out_lo32;
1812 bufBefore = (const Bytef *)pfile_in_zip_read_info->bstream.next_out;
1814 err=BZ2_bzDecompress(&pfile_in_zip_read_info->bstream);
1816 uTotalOutAfter = pfile_in_zip_read_info->bstream.total_out_lo32;
1819 pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis;
1821 pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis));
1822 pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis;
1825 pfile_in_zip_read_info->stream.next_in = (Bytef*)pfile_in_zip_read_info->bstream.next_in;
1826 pfile_in_zip_read_info->stream.avail_in = pfile_in_zip_read_info->bstream.avail_in;
1827 pfile_in_zip_read_info->stream.total_in = pfile_in_zip_read_info->bstream.total_in_lo32;
1828 pfile_in_zip_read_info->stream.next_out = (Bytef*)pfile_in_zip_read_info->bstream.next_out;
1829 pfile_in_zip_read_info->stream.avail_out = pfile_in_zip_read_info->bstream.avail_out;
1830 pfile_in_zip_read_info->stream.total_out = pfile_in_zip_read_info->bstream.total_out_lo32;
1845 uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
1846 bufBefore = pfile_in_zip_read_info->stream.next_out;
1849 if ((pfile_in_zip_read_info->rest_read_uncompressed ==
1850 pfile_in_zip_read_info->stream.avail_out) &&
1851 (pfile_in_zip_read_info->rest_read_compressed == 0))
1854 err=inflate(&pfile_in_zip_read_info->stream,flush);
1856 if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL))
1859 uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
1862 pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis;
1864 pfile_in_zip_read_info->crc32 =
1865 crc32(pfile_in_zip_read_info->crc32,bufBefore,
1868 pfile_in_zip_read_info->rest_read_uncompressed -=
1892 file_in_zip64_read_info_s* pfile_in_zip_read_info;
1896 pfile_in_zip_read_info=s->pfile_in_zip_read;
1898 if (pfile_in_zip_read_info==NULL)
1901 return (z_off_t)pfile_in_zip_read_info->stream.total_out;
1908 file_in_zip64_read_info_s* pfile_in_zip_read_info;
1912 pfile_in_zip_read_info=s->pfile_in_zip_read;
1914 if (pfile_in_zip_read_info==NULL)
1917 return pfile_in_zip_read_info->total_out_64;
1927 file_in_zip64_read_info_s* pfile_in_zip_read_info;
1931 pfile_in_zip_read_info=s->pfile_in_zip_read;
1933 if (pfile_in_zip_read_info==NULL)
1936 if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
1959 file_in_zip64_read_info_s* pfile_in_zip_read_info;
1966 pfile_in_zip_read_info=s->pfile_in_zip_read;
1968 if (pfile_in_zip_read_info==NULL)
1971 size_to_read = (pfile_in_zip_read_info->size_local_extrafield -
1972 pfile_in_zip_read_info->pos_local_extrafield);
1985 if (ZSEEK64(pfile_in_zip_read_info->z_filefunc,
1986 pfile_in_zip_read_info->filestream,
1987 pfile_in_zip_read_info->offset_local_extrafield +
1988 pfile_in_zip_read_info->pos_local_extrafield,
1992 if (ZREAD64(pfile_in_zip_read_info->z_filefunc,
1993 pfile_in_zip_read_info->filestream,
2009 file_in_zip64_read_info_s* pfile_in_zip_read_info;
2013 pfile_in_zip_read_info=s->pfile_in_zip_read;
2015 if (pfile_in_zip_read_info==NULL)
2019 if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) &&
2020 (!pfile_in_zip_read_info->raw))
2022 if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
2027 TRYFREE(pfile_in_zip_read_info->read_buffer);
2028 pfile_in_zip_read_info->read_buffer = NULL;
2029 if (pfile_in_zip_read_info->stream_initialised == Z_DEFLATED)
2030 inflateEnd(&pfile_in_zip_read_info->stream);
2032 else if (pfile_in_zip_read_info->stream_initialised == Z_BZIP2ED)
2033 BZ2_bzDecompressEnd(&pfile_in_zip_read_info->bstream);
2037 pfile_in_zip_read_info->stream_initialised = 0;
2038 TRYFREE(pfile_in_zip_read_info);