Searched refs:lfh (Results 1 – 3 of 3) sorted by relevance
333 const LocalFileHeader* lfh; in CalculateLocalFileEntrySize() local343 lfh = reinterpret_cast<const LocalFileHeader*>(lfhMapped.data()); in CalculateLocalFileEntrySize()344 if (lfh->lfh_signature != kLocalFileHeaderMagic) { in CalculateLocalFileEntrySize()366 off_t ddOffset = localFileHeaderOffset + kLocalFileHeaderSize + lfh->file_name_length + in CalculateLocalFileEntrySize()367 lfh->extra_field_length + dataSize; in CalculateLocalFileEntrySize()371 if (lfh->gpb_flags & kGPBDDFlagMask) { in CalculateLocalFileEntrySize()400 localDataSize = (lfh->compression_method == kCompressStored) ? dd->uncompressed_size in CalculateLocalFileEntrySize()404 localDataSize = (lfh->compression_method == kCompressStored) ? lfh->uncompressed_size in CalculateLocalFileEntrySize()405 : lfh->compressed_size; in CalculateLocalFileEntrySize()415 return kLocalFileHeaderSize + lfh->file_name_length + lfh->extra_field_length + dataSize + in CalculateLocalFileEntrySize()
740 auto lfh = reinterpret_cast<const LocalFileHeader*>(lfh_buf); in FindEntry() local741 if (lfh->lfh_signature != LocalFileHeader::kSignature) { in FindEntry()750 if (lfh->file_name_length != nameLen) { in FindEntry()752 std::string(entryName).c_str(), lfh->file_name_length, nameLen); in FindEntry()756 if (name_offset > cd_offset - lfh->file_name_length) { in FindEntry()771 uint64_t lfh_uncompressed_size = lfh->uncompressed_size; in FindEntry()772 uint64_t lfh_compressed_size = lfh->compressed_size; in FindEntry()781 const off64_t lfh_extra_field_offset = name_offset + lfh->file_name_length; in FindEntry()782 const uint16_t lfh_extra_field_size = lfh->extra_field_length; in FindEntry()797 local_extra_field.data(), lfh_extra_field_size, lfh->uncompressed_size, in FindEntry()[all …]
1020 LocalFileHeader lfh = {}; in ConstructLocalFileHeader() local1021 lfh.lfh_signature = LocalFileHeader::kSignature; in ConstructLocalFileHeader()1022 lfh.compressed_size = compressed_size; in ConstructLocalFileHeader()1023 lfh.uncompressed_size = uncompressed_size; in ConstructLocalFileHeader()1024 lfh.file_name_length = static_cast<uint16_t>(name.size()); in ConstructLocalFileHeader()1025 lfh.extra_field_length = 20; in ConstructLocalFileHeader()1026 *output = std::vector<uint8_t>(reinterpret_cast<uint8_t*>(&lfh), in ConstructLocalFileHeader()1027 reinterpret_cast<uint8_t*>(&lfh) + sizeof(LocalFileHeader)); in ConstructLocalFileHeader()