Lines Matching refs:tgt
332 bool ImageChunk::MakePatch(const ImageChunk& tgt, const ImageChunk& src, in MakePatch() argument
348 int r = bsdiff::bsdiff(src.DataForPatch(), src.DataLengthForPatch(), tgt.DataForPatch(), in MakePatch()
349 tgt.DataLengthForPatch(), ptemp, bsdiff_cache); in MakePatch()
444 PatchChunk::PatchChunk(const ImageChunk& tgt, const ImageChunk& src, std::vector<uint8_t> data) in PatchChunk() argument
445 : type_(tgt.GetType()), in PatchChunk()
449 target_start_(tgt.GetStartOffset()), in PatchChunk()
450 target_len_(tgt.GetRawDataLength()), in PatchChunk()
451 target_uncompressed_len_(tgt.DataLengthForPatch()), in PatchChunk()
452 target_compress_level_(tgt.GetCompressLevel()), in PatchChunk()
456 PatchChunk::PatchChunk(const ImageChunk& tgt) in PatchChunk() argument
461 target_start_(tgt.GetStartOffset()), in PatchChunk()
462 target_len_(tgt.GetRawDataLength()), in PatchChunk()
463 target_uncompressed_len_(tgt.DataLengthForPatch()), in PatchChunk()
464 target_compress_level_(tgt.GetCompressLevel()), in PatchChunk()
465 data_(tgt.GetRawData(), tgt.GetRawData() + tgt.GetRawDataLength()) {} in PatchChunk()
468 bool PatchChunk::RawDataIsSmaller(const ImageChunk& tgt, size_t patch_size) { in RawDataIsSmaller() argument
469 size_t target_len = tgt.GetRawDataLength(); in RawDataIsSmaller()
470 return target_len < patch_size || (tgt.GetType() == CHUNK_NORMAL && target_len <= 160); in RawDataIsSmaller()
925 for (auto tgt = tgt_image.cbegin(); tgt != tgt_image.cend(); tgt++) { in SplitZipModeImageWithLimit() local
926 const ImageChunk* src = src_image.FindChunkByName(tgt->GetEntryName(), true); in SplitZipModeImageWithLimit()
928 split_tgt_chunks.emplace_back(CHUNK_NORMAL, tgt->GetStartOffset(), &tgt_image.file_content_, in SplitZipModeImageWithLimit()
929 tgt->GetRawDataLength()); in SplitZipModeImageWithLimit()
942 split_tgt_chunks.emplace_back(CHUNK_NORMAL, tgt->GetStartOffset(), &tgt_image.file_content_, in SplitZipModeImageWithLimit()
943 tgt->GetRawDataLength()); in SplitZipModeImageWithLimit()
950 split_tgt_chunks.push_back(*tgt); in SplitZipModeImageWithLimit()
953 split_tgt_chunks.emplace_back(CHUNK_NORMAL, tgt->GetStartOffset(), &tgt_image.file_content_, in SplitZipModeImageWithLimit()
954 tgt->GetRawDataLength()); in SplitZipModeImageWithLimit()
972 tgt--; in SplitZipModeImageWithLimit()