• Home
  • Raw
  • Download

Lines Matching refs:ci

171     curfile64_info ci;            /* info on the file curretly writing */  member
876 ziinit.ci.stream_initialised = 0; in zipOpen3()
969 if(zi->ci.zip64) in Write_LocalFileHeader()
976 err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2); in Write_LocalFileHeader()
979 err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2); in Write_LocalFileHeader()
982 err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4); in Write_LocalFileHeader()
989 if(zi->ci.zip64) in Write_LocalFileHeader()
996 if(zi->ci.zip64) in Write_LocalFileHeader()
1005 if(zi->ci.zip64) in Write_LocalFileHeader()
1026 if ((err==ZIP_OK) && (zi->ci.zip64)) in Write_LocalFileHeader()
1035 zi->ci.pos_zip64extrainfo = ZTELL64(zi->z_filefunc,zi->filestream); in Write_LocalFileHeader()
1120 zi->ci.dosDate = 0; in zipOpenNewFileInZip4_64()
1124 zi->ci.dosDate = zipfi->dosDate; in zipOpenNewFileInZip4_64()
1126 zi->ci.dosDate = zip64local_TmzDateToDosDate(&zipfi->tmz_date); in zipOpenNewFileInZip4_64()
1129 zi->ci.flag = flagBase; in zipOpenNewFileInZip4_64()
1131 zi->ci.flag |= 2; in zipOpenNewFileInZip4_64()
1133 zi->ci.flag |= 4; in zipOpenNewFileInZip4_64()
1135 zi->ci.flag |= 6; in zipOpenNewFileInZip4_64()
1137 zi->ci.flag |= 1; in zipOpenNewFileInZip4_64()
1139 zi->ci.crc32 = 0; in zipOpenNewFileInZip4_64()
1140 zi->ci.method = method; in zipOpenNewFileInZip4_64()
1141 zi->ci.encrypt = 0; in zipOpenNewFileInZip4_64()
1142 zi->ci.stream_initialised = 0; in zipOpenNewFileInZip4_64()
1143 zi->ci.pos_in_buffered_data = 0; in zipOpenNewFileInZip4_64()
1144 zi->ci.raw = raw; in zipOpenNewFileInZip4_64()
1145 zi->ci.pos_local_header = ZTELL64(zi->z_filefunc,zi->filestream); in zipOpenNewFileInZip4_64()
1147 …zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + size_extrafield_global + size_comm… in zipOpenNewFileInZip4_64()
1148 …zi->ci.size_centralExtraFree = 32; // Extra space we have reserved in case we need to add ZIP64 ex… in zipOpenNewFileInZip4_64()
1150 …zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader + zi->ci.size_centralExtraFre… in zipOpenNewFileInZip4_64()
1152 zi->ci.size_centralExtra = size_extrafield_global; in zipOpenNewFileInZip4_64()
1153 zip64local_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4); in zipOpenNewFileInZip4_64()
1155 zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)versionMadeBy,2); in zipOpenNewFileInZip4_64()
1156 zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2); in zipOpenNewFileInZip4_64()
1157 zip64local_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2); in zipOpenNewFileInZip4_64()
1158 zip64local_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2); in zipOpenNewFileInZip4_64()
1159 zip64local_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4); in zipOpenNewFileInZip4_64()
1160 zip64local_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/ in zipOpenNewFileInZip4_64()
1161 zip64local_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/ in zipOpenNewFileInZip4_64()
1162 zip64local_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/ in zipOpenNewFileInZip4_64()
1163 zip64local_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2); in zipOpenNewFileInZip4_64()
1164 zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2); in zipOpenNewFileInZip4_64()
1165 zip64local_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2); in zipOpenNewFileInZip4_64()
1166 zip64local_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/ in zipOpenNewFileInZip4_64()
1169 zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2); in zipOpenNewFileInZip4_64()
1171 zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2); in zipOpenNewFileInZip4_64()
1174 zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4); in zipOpenNewFileInZip4_64()
1176 zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4); in zipOpenNewFileInZip4_64()
1178 if(zi->ci.pos_local_header >= 0xffffffff) in zipOpenNewFileInZip4_64()
1179 zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)0xffffffff,4); in zipOpenNewFileInZip4_64()
1181 …zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header - zi->add_pos… in zipOpenNewFileInZip4_64()
1184 *(zi->ci.central_header+SIZECENTRALHEADER+i) = *(filename+i); in zipOpenNewFileInZip4_64()
1187 *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+i) = in zipOpenNewFileInZip4_64()
1191 *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+ in zipOpenNewFileInZip4_64()
1193 if (zi->ci.central_header == NULL) in zipOpenNewFileInZip4_64()
1196 zi->ci.zip64 = zip64; in zipOpenNewFileInZip4_64()
1197 zi->ci.totalCompressedData = 0; in zipOpenNewFileInZip4_64()
1198 zi->ci.totalUncompressedData = 0; in zipOpenNewFileInZip4_64()
1199 zi->ci.pos_zip64extrainfo = 0; in zipOpenNewFileInZip4_64()
1204 zi->ci.bstream.avail_in = (uInt)0; in zipOpenNewFileInZip4_64()
1205 zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; in zipOpenNewFileInZip4_64()
1206 zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; in zipOpenNewFileInZip4_64()
1207 zi->ci.bstream.total_in_hi32 = 0; in zipOpenNewFileInZip4_64()
1208 zi->ci.bstream.total_in_lo32 = 0; in zipOpenNewFileInZip4_64()
1209 zi->ci.bstream.total_out_hi32 = 0; in zipOpenNewFileInZip4_64()
1210 zi->ci.bstream.total_out_lo32 = 0; in zipOpenNewFileInZip4_64()
1213 zi->ci.stream.avail_in = (uInt)0; in zipOpenNewFileInZip4_64()
1214 zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; in zipOpenNewFileInZip4_64()
1215 zi->ci.stream.next_out = zi->ci.buffered_data; in zipOpenNewFileInZip4_64()
1216 zi->ci.stream.total_in = 0; in zipOpenNewFileInZip4_64()
1217 zi->ci.stream.total_out = 0; in zipOpenNewFileInZip4_64()
1218 zi->ci.stream.data_type = Z_BINARY; in zipOpenNewFileInZip4_64()
1221 … if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED || zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) in zipOpenNewFileInZip4_64()
1223 if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) in zipOpenNewFileInZip4_64()
1226 if(zi->ci.method == Z_DEFLATED) in zipOpenNewFileInZip4_64()
1228 zi->ci.stream.zalloc = (alloc_func)0; in zipOpenNewFileInZip4_64()
1229 zi->ci.stream.zfree = (free_func)0; in zipOpenNewFileInZip4_64()
1230 zi->ci.stream.opaque = (voidpf)0; in zipOpenNewFileInZip4_64()
1235 err = deflateInit2(&zi->ci.stream, level, Z_DEFLATED, windowBits, memLevel, strategy); in zipOpenNewFileInZip4_64()
1238 zi->ci.stream_initialised = Z_DEFLATED; in zipOpenNewFileInZip4_64()
1240 else if(zi->ci.method == Z_BZIP2ED) in zipOpenNewFileInZip4_64()
1244 zi->ci.bstream.bzalloc = 0; in zipOpenNewFileInZip4_64()
1245 zi->ci.bstream.bzfree = 0; in zipOpenNewFileInZip4_64()
1246 zi->ci.bstream.opaque = (voidpf)0; in zipOpenNewFileInZip4_64()
1248 err = BZ2_bzCompressInit(&zi->ci.bstream, level, 0,35); in zipOpenNewFileInZip4_64()
1250 zi->ci.stream_initialised = Z_BZIP2ED; in zipOpenNewFileInZip4_64()
1257 zi->ci.crypt_header_size = 0; in zipOpenNewFileInZip4_64()
1262 zi->ci.encrypt = 1; in zipOpenNewFileInZip4_64()
1263 zi->ci.pcrc_32_tab = get_crc_table(); in zipOpenNewFileInZip4_64()
1266 … sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting); in zipOpenNewFileInZip4_64()
1267 zi->ci.crypt_header_size = sizeHead; in zipOpenNewFileInZip4_64()
1381 if (zi->ci.encrypt != 0) in zip64FlushWriteBuffer()
1386 for (i=0;i<zi->ci.pos_in_buffered_data;i++) in zip64FlushWriteBuffer()
1387 … zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, zi->ci.buffered_data[i],t); in zip64FlushWriteBuffer()
1391 …if (ZWRITE64(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) != zi… in zip64FlushWriteBuffer()
1394 zi->ci.totalCompressedData += zi->ci.pos_in_buffered_data; in zip64FlushWriteBuffer()
1397 if(zi->ci.method == Z_BZIP2ED) in zip64FlushWriteBuffer()
1399 zi->ci.totalUncompressedData += zi->ci.bstream.total_in_lo32; in zip64FlushWriteBuffer()
1400 zi->ci.bstream.total_in_lo32 = 0; in zip64FlushWriteBuffer()
1401 zi->ci.bstream.total_in_hi32 = 0; in zip64FlushWriteBuffer()
1406 zi->ci.totalUncompressedData += zi->ci.stream.total_in; in zip64FlushWriteBuffer()
1407 zi->ci.stream.total_in = 0; in zip64FlushWriteBuffer()
1411 zi->ci.pos_in_buffered_data = 0; in zip64FlushWriteBuffer()
1428 zi->ci.crc32 = crc32(zi->ci.crc32,buf,(uInt)len); in zipWriteInFileInZip()
1431 if(zi->ci.method == Z_BZIP2ED && (!zi->ci.raw)) in zipWriteInFileInZip()
1433 zi->ci.bstream.next_in = (void*)buf; in zipWriteInFileInZip()
1434 zi->ci.bstream.avail_in = len; in zipWriteInFileInZip()
1437 while ((err==BZ_RUN_OK) && (zi->ci.bstream.avail_in>0)) in zipWriteInFileInZip()
1439 if (zi->ci.bstream.avail_out == 0) in zipWriteInFileInZip()
1443 zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; in zipWriteInFileInZip()
1444 zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; in zipWriteInFileInZip()
1451 if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) in zipWriteInFileInZip()
1453 uLong uTotalOutBefore_lo = zi->ci.bstream.total_out_lo32; in zipWriteInFileInZip()
1455 err=BZ2_bzCompress(&zi->ci.bstream, BZ_RUN); in zipWriteInFileInZip()
1457 … zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore_lo) ; in zipWriteInFileInZip()
1467 zi->ci.stream.next_in = (Bytef*)buf; in zipWriteInFileInZip()
1468 zi->ci.stream.avail_in = len; in zipWriteInFileInZip()
1470 while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) in zipWriteInFileInZip()
1472 if (zi->ci.stream.avail_out == 0) in zipWriteInFileInZip()
1476 zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; in zipWriteInFileInZip()
1477 zi->ci.stream.next_out = zi->ci.buffered_data; in zipWriteInFileInZip()
1484 if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) in zipWriteInFileInZip()
1486 uLong uTotalOutBefore = zi->ci.stream.total_out; in zipWriteInFileInZip()
1487 err=deflate(&zi->ci.stream, Z_NO_FLUSH); in zipWriteInFileInZip()
1489 zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; in zipWriteInFileInZip()
1494 if (zi->ci.stream.avail_in < zi->ci.stream.avail_out) in zipWriteInFileInZip()
1495 copy_this = zi->ci.stream.avail_in; in zipWriteInFileInZip()
1497 copy_this = zi->ci.stream.avail_out; in zipWriteInFileInZip()
1500 *(((char*)zi->ci.stream.next_out)+i) = in zipWriteInFileInZip()
1501 *(((const char*)zi->ci.stream.next_in)+i); in zipWriteInFileInZip()
1503 zi->ci.stream.avail_in -= copy_this; in zipWriteInFileInZip()
1504 zi->ci.stream.avail_out-= copy_this; in zipWriteInFileInZip()
1505 zi->ci.stream.next_in+= copy_this; in zipWriteInFileInZip()
1506 zi->ci.stream.next_out+= copy_this; in zipWriteInFileInZip()
1507 zi->ci.stream.total_in+= copy_this; in zipWriteInFileInZip()
1508 zi->ci.stream.total_out+= copy_this; in zipWriteInFileInZip()
1509 zi->ci.pos_in_buffered_data += copy_this; in zipWriteInFileInZip()
1537 zi->ci.stream.avail_in = 0; in zipCloseFileInZipRaw64()
1539 if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) in zipCloseFileInZipRaw64()
1544 if (zi->ci.stream.avail_out == 0) in zipCloseFileInZipRaw64()
1548 zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; in zipCloseFileInZipRaw64()
1549 zi->ci.stream.next_out = zi->ci.buffered_data; in zipCloseFileInZipRaw64()
1551 uTotalOutBefore = zi->ci.stream.total_out; in zipCloseFileInZipRaw64()
1552 err=deflate(&zi->ci.stream, Z_FINISH); in zipCloseFileInZipRaw64()
1553 … zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; in zipCloseFileInZipRaw64()
1556 else if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) in zipCloseFileInZipRaw64()
1563 if (zi->ci.bstream.avail_out == 0) in zipCloseFileInZipRaw64()
1567 zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; in zipCloseFileInZipRaw64()
1568 zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; in zipCloseFileInZipRaw64()
1570 uTotalOutBefore = zi->ci.bstream.total_out_lo32; in zipCloseFileInZipRaw64()
1571 err=BZ2_bzCompress(&zi->ci.bstream, BZ_FINISH); in zipCloseFileInZipRaw64()
1575 zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore); in zipCloseFileInZipRaw64()
1586 if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK)) in zipCloseFileInZipRaw64()
1592 if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) in zipCloseFileInZipRaw64()
1594 int tmp_err = deflateEnd(&zi->ci.stream); in zipCloseFileInZipRaw64()
1597 zi->ci.stream_initialised = 0; in zipCloseFileInZipRaw64()
1600 else if((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) in zipCloseFileInZipRaw64()
1602 int tmperr = BZ2_bzCompressEnd(&zi->ci.bstream); in zipCloseFileInZipRaw64()
1605 zi->ci.stream_initialised = 0; in zipCloseFileInZipRaw64()
1609 if (!zi->ci.raw) in zipCloseFileInZipRaw64()
1611 crc32 = (uLong)zi->ci.crc32; in zipCloseFileInZipRaw64()
1612 uncompressed_size = zi->ci.totalUncompressedData; in zipCloseFileInZipRaw64()
1614 compressed_size = zi->ci.totalCompressedData; in zipCloseFileInZipRaw64()
1617 compressed_size += zi->ci.crypt_header_size; in zipCloseFileInZipRaw64()
1621 …if(compressed_size >= 0xffffffff || uncompressed_size >= 0xffffffff || zi->ci.pos_local_header >= … in zipCloseFileInZipRaw64()
1624 zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)45,2); in zipCloseFileInZipRaw64()
1626 zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)45,2); in zipCloseFileInZipRaw64()
1630 zip64local_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/ in zipCloseFileInZipRaw64()
1634 zip64local_putValue_inmemory(zi->ci.central_header+20, invalidValue,4); /*compr size*/ in zipCloseFileInZipRaw64()
1636 zip64local_putValue_inmemory(zi->ci.central_header+20, compressed_size,4); /*compr size*/ in zipCloseFileInZipRaw64()
1639 if (zi->ci.stream.data_type == Z_ASCII) in zipCloseFileInZipRaw64()
1640 zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2); in zipCloseFileInZipRaw64()
1643 zip64local_putValue_inmemory(zi->ci.central_header+24, invalidValue,4); /*uncompr size*/ in zipCloseFileInZipRaw64()
1645 zip64local_putValue_inmemory(zi->ci.central_header+24, uncompressed_size,4); /*uncompr size*/ in zipCloseFileInZipRaw64()
1656 if(zi->ci.pos_local_header >= 0xffffffff) in zipCloseFileInZipRaw64()
1663 if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree) in zipCloseFileInZipRaw64()
1669 p = zi->ci.central_header + zi->ci.size_centralheader; in zipCloseFileInZipRaw64()
1689 if(zi->ci.pos_local_header >= 0xffffffff) in zipCloseFileInZipRaw64()
1691 zip64local_putValue_inmemory(p, zi->ci.pos_local_header, 8); in zipCloseFileInZipRaw64()
1698 zi->ci.size_centralExtraFree -= datasize + 4; in zipCloseFileInZipRaw64()
1699 zi->ci.size_centralheader += datasize + 4; in zipCloseFileInZipRaw64()
1702 zi->ci.size_centralExtra += datasize + 4; in zipCloseFileInZipRaw64()
1703 zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)zi->ci.size_centralExtra,2); in zipCloseFileInZipRaw64()
1707 …err = add_data_in_datablock(&zi->central_dir, zi->ci.central_header, (uLong)zi->ci.size_centralhea… in zipCloseFileInZipRaw64()
1709 free(zi->ci.central_header); in zipCloseFileInZipRaw64()
1717 …if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0) in zipCloseFileInZipRaw64()
1725 if(zi->ci.pos_zip64extrainfo > 0) in zipCloseFileInZipRaw64()
1728 …if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_zip64extrainfo + 4,ZLIB_FILEFUNC_SEEK_SET)!=… in zipCloseFileInZipRaw64()