Lines Matching refs:entry

68  * We want "open" and "find entry by name" to be fast operations, and
82 * of the string length into the hash table entry.
132 ALOGV("Zip: Unable to find entry %.*s", name.name_length, name.name);
137 * Add a new entry to the hash table.
150 // We've found a duplicate entry. We don't accept it
151 ALOGW("Zip: Found duplicate entry %.*s", name.name_length, name.name);
310 * least one unused entry to avoid an infinite loop during creation.
316 ALOGW("Zip: unable to allocate the %u-entry hash_table, entry size: %zu",
344 ALOGW("Zip: bad LFH offset %" PRId64 " at entry %" PRIu16,
372 ALOGW("Zip: Error adding entry to hash table %d", add_result);
378 ALOGW("Zip: bad CD advance (%tu vs %zu) at entry %" PRIu16, ptr - cd_ptr, cd_length, i);
386 ALOGW("Zip: Unable to read header for entry at offset == 0.");
452 static int32_t ValidateDataDescriptor(MappedZipFile& mapped_zip, ZipEntry* entry) {
464 if (entry->compressed_length != descriptor->compressed_size ||
465 entry->uncompressed_length != descriptor->uncompressed_size ||
466 entry->crc32 != descriptor->crc32) {
469 entry->compressed_length, entry->uncompressed_length, entry->crc32,
480 // Recover the start of the central directory entry from the filename
481 // pointer. The filename is the first entry past the fixed-size data,
491 ALOGW("Zip: Invalid entry pointer");
550 // that flag and always enforces that entry names are valid UTF-8.
557 // header agree on the crc, compressed, and uncompressed sizes of the entry.
695 ALOGV("Zip: Could not find entry %.*s", entryName.name_length, entryName.name);
778 // Creates a FileWriter for |fd| and prepare to write |entry| to it,
780 // space on the volume to write out the entry completely and that the file
785 static std::unique_ptr<FileWriter> Create(int fd, const ZipEntry* entry) {
786 const uint32_t declared_length = entry->uncompressed_length;
797 // entry. Note that the call to ftruncate below will change the file size but
868 static int32_t InflateEntryToWriter(MappedZipFile& mapped_zip, const ZipEntry* entry,
910 const uint32_t uncompressed_length = entry->uncompressed_length;
913 uint32_t compressed_length = entry->compressed_length;
971 static int32_t CopyEntryToWriter(MappedZipFile& mapped_zip, const ZipEntry* entry, Writer* writer,
976 const uint32_t length = entry->uncompressed_length;
1002 int32_t ExtractToWriter(ZipArchiveHandle handle, ZipEntry* entry, Writer* writer) {
1004 const uint16_t method = entry->method;
1005 off64_t data_offset = entry->offset;
1016 return_value = CopyEntryToWriter(archive->mapped_zip, entry, writer, &crc);
1018 return_value = InflateEntryToWriter(archive->mapped_zip, entry, writer, &crc);
1021 if (!return_value && entry->has_data_descriptor) {
1022 return_value = ValidateDataDescriptor(archive->mapped_zip, entry);
1029 if (kCrcChecksEnabled && (entry->crc32 != static_cast<uint32_t>(crc))) {
1030 ALOGW("Zip: crc mismatch: expected %" PRIu32 ", was %" PRIu64, entry->crc32, crc);
1037 int32_t ExtractToMemory(ZipArchiveHandle handle, ZipEntry* entry, uint8_t* begin, uint32_t size) {
1039 return ExtractToWriter(handle, entry, writer.get());
1042 int32_t ExtractEntryToFile(ZipArchiveHandle handle, ZipEntry* entry, int fd) {
1043 std::unique_ptr<Writer> writer(FileWriter::Create(fd, entry));
1048 return ExtractToWriter(handle, entry, writer.get());
1090 int32_t ProcessZipEntryContents(ZipArchiveHandle handle, ZipEntry* entry,
1093 return ExtractToWriter(handle, entry, &writer);