Home
last modified time | relevance | path

Searched refs:cdr (Results 1 – 4 of 4) sorted by relevance

/system/core/adb/fastdeploy/deploypatchgenerator/
Dapk_archive.cpp266 const CentralDirectoryRecord* cdr; in ParseCentralDirectoryRecord() local
267 if (size < sizeof(*cdr)) { in ParseCentralDirectoryRecord()
272 cdr = reinterpret_cast<const CentralDirectoryRecord*>(begin); in ParseCentralDirectoryRecord()
273 if (cdr->record_signature != kCDFileHeaderMagic) { in ParseCentralDirectoryRecord()
277 auto end = begin + sizeof(*cdr) + cdr->file_name_length + cdr->extra_field_length + in ParseCentralDirectoryRecord()
278 cdr->comment_length; in ParseCentralDirectoryRecord()
284 *localFileHeaderOffset = cdr->local_file_header_offset; in ParseCentralDirectoryRecord()
285 *dataSize = (cdr->compression_method == kCompressStored) ? cdr->uncompressed_size in ParseCentralDirectoryRecord()
286 : cdr->compressed_size; in ParseCentralDirectoryRecord()
/system/libziparchive/
Dzip_archive.cc474 auto cdr = reinterpret_cast<const CentralDirectoryRecord*>(ptr); in ParseZipArchive() local
475 if (cdr->record_signature != CentralDirectoryRecord::kSignature) { in ParseZipArchive()
480 const uint16_t file_name_length = cdr->file_name_length; in ParseZipArchive()
481 const uint16_t extra_length = cdr->extra_field_length; in ParseZipArchive()
482 const uint16_t comment_length = cdr->comment_length; in ParseZipArchive()
500 off64_t local_header_offset = cdr->local_file_header_offset; in ParseZipArchive()
504 extra_field, extra_length, cdr->uncompressed_size, cdr->compressed_size, in ParseZipArchive()
505 cdr->local_file_header_offset, &zip64_info); in ParseZipArchive()
688 auto cdr = reinterpret_cast<const CentralDirectoryRecord*>(ptr); in FindEntry() local
698 data->method = cdr->compression_method; in FindEntry()
[all …]
Dzip_writer.cc518 CentralDirectoryRecord cdr = {}; in Finish() local
519 cdr.record_signature = CentralDirectoryRecord::kSignature; in Finish()
521 cdr.gpb_flags |= kGPBDDFlagMask; in Finish()
523 cdr.compression_method = file.compression_method; in Finish()
524 cdr.last_mod_time = file.last_mod_time; in Finish()
525 cdr.last_mod_date = file.last_mod_date; in Finish()
526 cdr.crc32 = file.crc32; in Finish()
527 cdr.compressed_size = file.compressed_size; in Finish()
528 cdr.uncompressed_size = file.uncompressed_size; in Finish()
531 cdr.file_name_length = static_cast<uint16_t>(file.path.size()); in Finish()
[all …]
Dzip_archive_test.cc1050 CentralDirectoryRecord cdr = {}; in ConstructCentralDirectoryRecord() local
1051 cdr.record_signature = CentralDirectoryRecord::kSignature; in ConstructCentralDirectoryRecord()
1052 cdr.compressed_size = uncompressed_size; in ConstructCentralDirectoryRecord()
1053 cdr.uncompressed_size = compressed_size; in ConstructCentralDirectoryRecord()
1054 cdr.file_name_length = static_cast<uint16_t>(name.size()); in ConstructCentralDirectoryRecord()
1055 cdr.extra_field_length = local_offset == UINT32_MAX ? 28 : 20; in ConstructCentralDirectoryRecord()
1056 cdr.local_file_header_offset = local_offset; in ConstructCentralDirectoryRecord()
1058 std::vector<uint8_t>(reinterpret_cast<uint8_t*>(&cdr), in ConstructCentralDirectoryRecord()
1059 reinterpret_cast<uint8_t*>(&cdr) + sizeof(CentralDirectoryRecord)); in ConstructCentralDirectoryRecord()