Lines Matching full: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()
1106 zi->ci.dosDate = 0; in zipOpenNewFileInZip4_64()
1110 zi->ci.dosDate = zipfi->dosDate; in zipOpenNewFileInZip4_64()
1112 zi->ci.dosDate = zip64local_TmzDateToDosDate(&zipfi->tmz_date); in zipOpenNewFileInZip4_64()
1115 zi->ci.flag = flagBase; in zipOpenNewFileInZip4_64()
1117 zi->ci.flag |= 2; in zipOpenNewFileInZip4_64()
1119 zi->ci.flag |= 4; in zipOpenNewFileInZip4_64()
1121 zi->ci.flag |= 6; in zipOpenNewFileInZip4_64()
1123 zi->ci.flag |= 1; in zipOpenNewFileInZip4_64()
1125 zi->ci.crc32 = 0; in zipOpenNewFileInZip4_64()
1126 zi->ci.method = method; in zipOpenNewFileInZip4_64()
1127 zi->ci.encrypt = 0; in zipOpenNewFileInZip4_64()
1128 zi->ci.stream_initialised = 0; in zipOpenNewFileInZip4_64()
1129 zi->ci.pos_in_buffered_data = 0; in zipOpenNewFileInZip4_64()
1130 zi->ci.raw = raw; in zipOpenNewFileInZip4_64()
1131 zi->ci.pos_local_header = ZTELL64(zi->z_filefunc,zi->filestream); in zipOpenNewFileInZip4_64()
1133 …zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + size_extrafield_global + size_comm… in zipOpenNewFileInZip4_64()
1134 …zi->ci.size_centralExtraFree = 32; // Extra space we have reserved in case we need to add ZIP64 ex… in zipOpenNewFileInZip4_64()
1136 …zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader + zi->ci.size_centralExtraFre… in zipOpenNewFileInZip4_64()
1138 zi->ci.size_centralExtra = size_extrafield_global; in zipOpenNewFileInZip4_64()
1139 zip64local_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4); in zipOpenNewFileInZip4_64()
1141 zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)versionMadeBy,2); in zipOpenNewFileInZip4_64()
1142 zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2); in zipOpenNewFileInZip4_64()
1143 zip64local_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2); in zipOpenNewFileInZip4_64()
1144 zip64local_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2); in zipOpenNewFileInZip4_64()
1145 zip64local_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4); in zipOpenNewFileInZip4_64()
1146 zip64local_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/ in zipOpenNewFileInZip4_64()
1147 zip64local_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/ in zipOpenNewFileInZip4_64()
1148 zip64local_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/ in zipOpenNewFileInZip4_64()
1149 zip64local_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2); in zipOpenNewFileInZip4_64()
1150 zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2); in zipOpenNewFileInZip4_64()
1151 zip64local_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2); in zipOpenNewFileInZip4_64()
1152 zip64local_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/ in zipOpenNewFileInZip4_64()
1155 zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2); in zipOpenNewFileInZip4_64()
1157 zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2); in zipOpenNewFileInZip4_64()
1160 zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4); in zipOpenNewFileInZip4_64()
1162 zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4); in zipOpenNewFileInZip4_64()
1164 if(zi->ci.pos_local_header >= 0xffffffff) in zipOpenNewFileInZip4_64()
1165 zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)0xffffffff,4); in zipOpenNewFileInZip4_64()
1167 …zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header - zi->add_pos… in zipOpenNewFileInZip4_64()
1170 *(zi->ci.central_header+SIZECENTRALHEADER+i) = *(filename+i); in zipOpenNewFileInZip4_64()
1173 *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+i) = in zipOpenNewFileInZip4_64()
1177 *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+ in zipOpenNewFileInZip4_64()
1179 if (zi->ci.central_header == NULL) in zipOpenNewFileInZip4_64()
1182 zi->ci.zip64 = zip64; in zipOpenNewFileInZip4_64()
1183 zi->ci.totalCompressedData = 0; in zipOpenNewFileInZip4_64()
1184 zi->ci.totalUncompressedData = 0; in zipOpenNewFileInZip4_64()
1185 zi->ci.pos_zip64extrainfo = 0; in zipOpenNewFileInZip4_64()
1190 zi->ci.bstream.avail_in = (uInt)0; in zipOpenNewFileInZip4_64()
1191 zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; in zipOpenNewFileInZip4_64()
1192 zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; in zipOpenNewFileInZip4_64()
1193 zi->ci.bstream.total_in_hi32 = 0; in zipOpenNewFileInZip4_64()
1194 zi->ci.bstream.total_in_lo32 = 0; in zipOpenNewFileInZip4_64()
1195 zi->ci.bstream.total_out_hi32 = 0; in zipOpenNewFileInZip4_64()
1196 zi->ci.bstream.total_out_lo32 = 0; in zipOpenNewFileInZip4_64()
1199 zi->ci.stream.avail_in = (uInt)0; in zipOpenNewFileInZip4_64()
1200 zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; in zipOpenNewFileInZip4_64()
1201 zi->ci.stream.next_out = zi->ci.buffered_data; in zipOpenNewFileInZip4_64()
1202 zi->ci.stream.total_in = 0; in zipOpenNewFileInZip4_64()
1203 zi->ci.stream.total_out = 0; in zipOpenNewFileInZip4_64()
1204 zi->ci.stream.data_type = Z_BINARY; in zipOpenNewFileInZip4_64()
1207 … if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED || zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) in zipOpenNewFileInZip4_64()
1209 if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) in zipOpenNewFileInZip4_64()
1212 if(zi->ci.method == Z_DEFLATED) in zipOpenNewFileInZip4_64()
1214 zi->ci.stream.zalloc = (alloc_func)0; in zipOpenNewFileInZip4_64()
1215 zi->ci.stream.zfree = (free_func)0; in zipOpenNewFileInZip4_64()
1216 zi->ci.stream.opaque = (voidpf)0; in zipOpenNewFileInZip4_64()
1221 err = deflateInit2(&zi->ci.stream, level, Z_DEFLATED, windowBits, memLevel, strategy); in zipOpenNewFileInZip4_64()
1224 zi->ci.stream_initialised = Z_DEFLATED; in zipOpenNewFileInZip4_64()
1226 else if(zi->ci.method == Z_BZIP2ED) in zipOpenNewFileInZip4_64()
1230 zi->ci.bstream.bzalloc = 0; in zipOpenNewFileInZip4_64()
1231 zi->ci.bstream.bzfree = 0; in zipOpenNewFileInZip4_64()
1232 zi->ci.bstream.opaque = (voidpf)0; in zipOpenNewFileInZip4_64()
1234 err = BZ2_bzCompressInit(&zi->ci.bstream, level, 0,35); in zipOpenNewFileInZip4_64()
1236 zi->ci.stream_initialised = Z_BZIP2ED; in zipOpenNewFileInZip4_64()
1243 zi->ci.crypt_header_size = 0; in zipOpenNewFileInZip4_64()
1248 zi->ci.encrypt = 1; in zipOpenNewFileInZip4_64()
1249 zi->ci.pcrc_32_tab = get_crc_table(); in zipOpenNewFileInZip4_64()
1250 /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/ in zipOpenNewFileInZip4_64()
1252 … sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting); in zipOpenNewFileInZip4_64()
1253 zi->ci.crypt_header_size = sizeHead; in zipOpenNewFileInZip4_64()
1367 if (zi->ci.encrypt != 0) in zip64FlushWriteBuffer()
1372 for (i=0;i<zi->ci.pos_in_buffered_data;i++) in zip64FlushWriteBuffer()
1373 … zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, zi->ci.buffered_data[i],t); in zip64FlushWriteBuffer()
1377 …if (ZWRITE64(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) != zi… in zip64FlushWriteBuffer()
1380 zi->ci.totalCompressedData += zi->ci.pos_in_buffered_data; in zip64FlushWriteBuffer()
1383 if(zi->ci.method == Z_BZIP2ED) in zip64FlushWriteBuffer()
1385 zi->ci.totalUncompressedData += zi->ci.bstream.total_in_lo32; in zip64FlushWriteBuffer()
1386 zi->ci.bstream.total_in_lo32 = 0; in zip64FlushWriteBuffer()
1387 zi->ci.bstream.total_in_hi32 = 0; in zip64FlushWriteBuffer()
1392 zi->ci.totalUncompressedData += zi->ci.stream.total_in; in zip64FlushWriteBuffer()
1393 zi->ci.stream.total_in = 0; in zip64FlushWriteBuffer()
1397 zi->ci.pos_in_buffered_data = 0; in zip64FlushWriteBuffer()
1414 zi->ci.crc32 = crc32(zi->ci.crc32,buf,(uInt)len); in zipWriteInFileInZip()
1417 if(zi->ci.method == Z_BZIP2ED && (!zi->ci.raw)) in zipWriteInFileInZip()
1419 zi->ci.bstream.next_in = (void*)buf; in zipWriteInFileInZip()
1420 zi->ci.bstream.avail_in = len; in zipWriteInFileInZip()
1423 while ((err==BZ_RUN_OK) && (zi->ci.bstream.avail_in>0)) in zipWriteInFileInZip()
1425 if (zi->ci.bstream.avail_out == 0) in zipWriteInFileInZip()
1429 zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; in zipWriteInFileInZip()
1430 zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; in zipWriteInFileInZip()
1437 if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) in zipWriteInFileInZip()
1439 uLong uTotalOutBefore_lo = zi->ci.bstream.total_out_lo32; in zipWriteInFileInZip()
1440 // uLong uTotalOutBefore_hi = zi->ci.bstream.total_out_hi32; in zipWriteInFileInZip()
1441 err=BZ2_bzCompress(&zi->ci.bstream, BZ_RUN); in zipWriteInFileInZip()
1443 … zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore_lo) ; in zipWriteInFileInZip()
1453 zi->ci.stream.next_in = (Bytef*)buf; in zipWriteInFileInZip()
1454 zi->ci.stream.avail_in = len; in zipWriteInFileInZip()
1456 while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) in zipWriteInFileInZip()
1458 if (zi->ci.stream.avail_out == 0) in zipWriteInFileInZip()
1462 zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; in zipWriteInFileInZip()
1463 zi->ci.stream.next_out = zi->ci.buffered_data; in zipWriteInFileInZip()
1470 if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) in zipWriteInFileInZip()
1472 uLong uTotalOutBefore = zi->ci.stream.total_out; in zipWriteInFileInZip()
1473 err=deflate(&zi->ci.stream, Z_NO_FLUSH); in zipWriteInFileInZip()
1474 if(uTotalOutBefore > zi->ci.stream.total_out) in zipWriteInFileInZip()
1480 zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; in zipWriteInFileInZip()
1485 if (zi->ci.stream.avail_in < zi->ci.stream.avail_out) in zipWriteInFileInZip()
1486 copy_this = zi->ci.stream.avail_in; in zipWriteInFileInZip()
1488 copy_this = zi->ci.stream.avail_out; in zipWriteInFileInZip()
1491 *(((char*)zi->ci.stream.next_out)+i) = in zipWriteInFileInZip()
1492 *(((const char*)zi->ci.stream.next_in)+i); in zipWriteInFileInZip()
1494 zi->ci.stream.avail_in -= copy_this; in zipWriteInFileInZip()
1495 zi->ci.stream.avail_out-= copy_this; in zipWriteInFileInZip()
1496 zi->ci.stream.next_in+= copy_this; in zipWriteInFileInZip()
1497 zi->ci.stream.next_out+= copy_this; in zipWriteInFileInZip()
1498 zi->ci.stream.total_in+= copy_this; in zipWriteInFileInZip()
1499 zi->ci.stream.total_out+= copy_this; in zipWriteInFileInZip()
1500 zi->ci.pos_in_buffered_data += copy_this; in zipWriteInFileInZip()
1528 zi->ci.stream.avail_in = 0; in zipCloseFileInZipRaw64()
1530 if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) in zipCloseFileInZipRaw64()
1535 if (zi->ci.stream.avail_out == 0) in zipCloseFileInZipRaw64()
1539 zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; in zipCloseFileInZipRaw64()
1540 zi->ci.stream.next_out = zi->ci.buffered_data; in zipCloseFileInZipRaw64()
1542 uTotalOutBefore = zi->ci.stream.total_out; in zipCloseFileInZipRaw64()
1543 err=deflate(&zi->ci.stream, Z_FINISH); in zipCloseFileInZipRaw64()
1544 … zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; in zipCloseFileInZipRaw64()
1547 else if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) in zipCloseFileInZipRaw64()
1554 if (zi->ci.bstream.avail_out == 0) in zipCloseFileInZipRaw64()
1558 zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; in zipCloseFileInZipRaw64()
1559 zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; in zipCloseFileInZipRaw64()
1561 uTotalOutBefore = zi->ci.bstream.total_out_lo32; in zipCloseFileInZipRaw64()
1562 err=BZ2_bzCompress(&zi->ci.bstream, BZ_FINISH); in zipCloseFileInZipRaw64()
1566 zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore); in zipCloseFileInZipRaw64()
1577 if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK)) in zipCloseFileInZipRaw64()
1583 if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) in zipCloseFileInZipRaw64()
1585 int tmp_err = deflateEnd(&zi->ci.stream); in zipCloseFileInZipRaw64()
1588 zi->ci.stream_initialised = 0; in zipCloseFileInZipRaw64()
1591 else if((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) in zipCloseFileInZipRaw64()
1593 int tmperr = BZ2_bzCompressEnd(&zi->ci.bstream); in zipCloseFileInZipRaw64()
1596 zi->ci.stream_initialised = 0; in zipCloseFileInZipRaw64()
1600 if (!zi->ci.raw) in zipCloseFileInZipRaw64()
1602 crc32 = (uLong)zi->ci.crc32; in zipCloseFileInZipRaw64()
1603 uncompressed_size = zi->ci.totalUncompressedData; in zipCloseFileInZipRaw64()
1605 compressed_size = zi->ci.totalCompressedData; in zipCloseFileInZipRaw64()
1608 compressed_size += zi->ci.crypt_header_size; in zipCloseFileInZipRaw64()
1612 …if(compressed_size >= 0xffffffff || uncompressed_size >= 0xffffffff || zi->ci.pos_local_header >= … in zipCloseFileInZipRaw64()
1615 zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)45,2); in zipCloseFileInZipRaw64()
1617 zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)45,2); in zipCloseFileInZipRaw64()
1621 zip64local_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/ in zipCloseFileInZipRaw64()
1625 zip64local_putValue_inmemory(zi->ci.central_header+20, invalidValue,4); /*compr size*/ in zipCloseFileInZipRaw64()
1627 zip64local_putValue_inmemory(zi->ci.central_header+20, compressed_size,4); /*compr size*/ in zipCloseFileInZipRaw64()
1630 if (zi->ci.stream.data_type == Z_ASCII) in zipCloseFileInZipRaw64()
1631 zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2); in zipCloseFileInZipRaw64()
1634 zip64local_putValue_inmemory(zi->ci.central_header+24, invalidValue,4); /*uncompr size*/ in zipCloseFileInZipRaw64()
1636 zip64local_putValue_inmemory(zi->ci.central_header+24, uncompressed_size,4); /*uncompr size*/ in zipCloseFileInZipRaw64()
1647 if(zi->ci.pos_local_header >= 0xffffffff) in zipCloseFileInZipRaw64()
1654 if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree) in zipCloseFileInZipRaw64()
1660 p = zi->ci.central_header + zi->ci.size_centralheader; in zipCloseFileInZipRaw64()
1680 if(zi->ci.pos_local_header >= 0xffffffff) in zipCloseFileInZipRaw64()
1682 zip64local_putValue_inmemory(p, zi->ci.pos_local_header, 8); in zipCloseFileInZipRaw64()
1689 zi->ci.size_centralExtraFree -= datasize + 4; in zipCloseFileInZipRaw64()
1690 zi->ci.size_centralheader += datasize + 4; in zipCloseFileInZipRaw64()
1693 zi->ci.size_centralExtra += datasize + 4; in zipCloseFileInZipRaw64()
1694 zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)zi->ci.size_centralExtra,2); in zipCloseFileInZipRaw64()
1698 …err = add_data_in_datablock(&zi->central_dir, zi->ci.central_header, (uLong)zi->ci.size_centralhea… in zipCloseFileInZipRaw64()
1700 free(zi->ci.central_header); in zipCloseFileInZipRaw64()
1708 …if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0) in zipCloseFileInZipRaw64()
1716 if(zi->ci.pos_zip64extrainfo > 0) in zipCloseFileInZipRaw64()
1719 …if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_zip64extrainfo + 4,ZLIB_FILEFUNC_SEEK_SET)!=… in zipCloseFileInZipRaw64()