MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / CopyFromFileEntry

Function CopyFromFileEntry

Bcore/src/main/cpp/ziparchive/zip_writer.cc:174–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174static void CopyFromFileEntry(const ZipWriter::FileEntry& src, bool use_data_descriptor,
175 LocalFileHeader* dst) {
176 dst->lfh_signature = LocalFileHeader::kSignature;
177 if (use_data_descriptor) {
178 // Set this flag to denote that a DataDescriptor struct will appear after the data,
179 // containing the crc and size fields.
180 dst->gpb_flags |= kGPBDDFlagMask;
181
182 // The size and crc fields must be 0.
183 dst->compressed_size = 0u;
184 dst->uncompressed_size = 0u;
185 dst->crc32 = 0u;
186 } else {
187 dst->compressed_size = src.compressed_size;
188 dst->uncompressed_size = src.uncompressed_size;
189 dst->crc32 = src.crc32;
190 }
191 dst->compression_method = src.compression_method;
192 dst->last_mod_time = src.last_mod_time;
193 dst->last_mod_date = src.last_mod_date;
194 dst->file_name_length = src.path.size();
195 dst->extra_field_length = src.padding_length;
196}
197
198int32_t ZipWriter::StartAlignedEntryWithTime(const char* path, size_t flags, time_t time,
199 uint32_t alignment) {

Callers 2

FinishEntryMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected