• Home
  • Raw
  • Download

Lines Matching refs:param

31 int32_t NormalImagePatch::ApplyImagePatch(const PatchParam &param, size_t &startOffset)  in ApplyImagePatch()  argument
34 if (offset + PATCH_NORMAL_MIN_HEADER_LEN > param.patchSize) { in ApplyImagePatch()
39 size_t srcStart = static_cast<size_t>(ReadLE<int64_t>(param.patch + offset)); in ApplyImagePatch()
41 size_t srcLen = static_cast<size_t>(ReadLE<int64_t>(param.patch + offset)); in ApplyImagePatch()
43 size_t patchOffset = static_cast<size_t>(ReadLE<int64_t>(param.patch + offset)); in ApplyImagePatch()
46 if (srcStart + srcLen > param.oldSize) { in ApplyImagePatch()
51 PatchBuffer patchInfo = {param.patch, patchOffset, param.patchSize}; in ApplyImagePatch()
52 BlockBuffer oldInfo = {param.oldBuff + srcStart, srcLen}; in ApplyImagePatch()
62 int32_t RowImagePatch::ApplyImagePatch(const PatchParam &param, size_t &startOffset) in ApplyImagePatch() argument
65 if (offset + sizeof(int32_t) > param.patchSize) { in ApplyImagePatch()
69 size_t dataLen = static_cast<size_t>(ReadLE<uint32_t>(param.patch + offset)); in ApplyImagePatch()
70 if (offset + dataLen > param.patchSize) { in ApplyImagePatch()
76 BlockBuffer data = {param.patch + offset, dataLen}; in ApplyImagePatch()
88 int32_t CompressedImagePatch::ApplyImagePatch(const PatchParam &param, size_t &startOffset) in ApplyImagePatch() argument
93 int32_t ret = ReadHeader(param, header, offset); in ApplyImagePatch()
97 …PATCH_CHECK(header.srcStart + header.srcLength <= param.oldSize, return -1, "Failed to check patch… in ApplyImagePatch()
101 BlockBuffer oldData = { param.oldBuff + header.srcStart, header.srcLength }; in ApplyImagePatch()
115 PatchBuffer patchInfo = {param.patch, header.patchOffset, param.patchSize}; in ApplyImagePatch()
166 int32_t ZipImagePatch::ReadHeader(const PatchParam &param, PatchHeader &header, size_t &offset) in ReadHeader() argument
168 if (offset + PATCH_DEFLATE_MIN_HEADER_LEN > param.patchSize) { in ReadHeader()
172 header.srcStart = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset)); in ReadHeader()
174 header.srcLength = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset)); in ReadHeader()
176 header.patchOffset = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset)); in ReadHeader()
178 header.expandedLen = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset)); in ReadHeader()
180 header.targetSize = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset)); in ReadHeader()
183 level_ = ReadLE<int32_t>(param.patch + offset); in ReadHeader()
185 method_ = ReadLE<int32_t>(param.patch + offset); in ReadHeader()
187 windowBits_ = ReadLE<int32_t>(param.patch + offset); in ReadHeader()
189 memLevel_ = ReadLE<int32_t>(param.patch + offset); in ReadHeader()
191 strategy_ = ReadLE<int32_t>(param.patch + offset); in ReadHeader()
219 int32_t Lz4ImagePatch::ReadHeader(const PatchParam &param, PatchHeader &header, size_t &offset) in ReadHeader() argument
221 if (offset + PATCH_LZ4_MIN_HEADER_LEN > param.patchSize) { in ReadHeader()
225 header.srcStart = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset)); in ReadHeader()
227 header.srcLength = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset)); in ReadHeader()
229 header.patchOffset = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset)); in ReadHeader()
231 header.expandedLen = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset)); in ReadHeader()
233 header.targetSize = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset)); in ReadHeader()
236 compressionLevel_ = static_cast<int32_t>(ReadLE<int32_t>(param.patch + offset)); in ReadHeader()
238 method_ = static_cast<int32_t>(ReadLE<int32_t>(param.patch + offset)); in ReadHeader()
240 blockIndependence_ = static_cast<int32_t>(ReadLE<int32_t>(param.patch + offset)); in ReadHeader()
242 contentChecksumFlag_ = static_cast<int32_t>(ReadLE<int32_t>(param.patch + offset)); in ReadHeader()
244 blockSizeID_ = static_cast<int32_t>(ReadLE<int32_t>(param.patch + offset)); in ReadHeader()
246 autoFlush_ = static_cast<int32_t>(ReadLE<int32_t>(param.patch + offset)); in ReadHeader()