Lines Matching refs:offset
35 size_t offset = startOffset;
36 if (offset + PATCH_NORMAL_MIN_HEADER_LEN > param.patchSize) {
41 size_t srcStart = static_cast<size_t>(ReadLE<int64_t>(param.patch + offset));
42 offset += sizeof(int64_t);
43 size_t srcLen = static_cast<size_t>(ReadLE<int64_t>(param.patch + offset));
44 offset += sizeof(int64_t);
45 size_t patchOffset = static_cast<size_t>(ReadLE<int64_t>(param.patch + offset));
46 offset += sizeof(int64_t);
61 startOffset = offset;
67 size_t offset = startOffset;
68 if (offset + sizeof(int32_t) > param.patchSize) {
72 size_t dataLen = static_cast<size_t>(ReadLE<uint32_t>(param.patch + offset));
73 if (offset + dataLen > param.patchSize) {
77 offset += sizeof(uint32_t);
79 BlockBuffer data = {param.patch + offset, dataLen};
87 startOffset = offset + dataLen;
91 int32_t CompressedImagePatch::StartReadHeader(const PatchParam ¶m, PatchHeader &header, size_t &offset)
93 int32_t ret = ReadHeader(param, header, offset);
110 size_t offset = startOffset;
113 if (StartReadHeader(param, header, offset) != 0) {
159 startOffset = offset;
215 int32_t ZipImagePatch::ReadHeader(const PatchParam ¶m, PatchHeader &header, size_t &offset)
217 if (offset + PATCH_DEFLATE_MIN_HEADER_LEN > param.patchSize) {
221 header.srcStart = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset));
222 offset += sizeof(uint64_t);
223 header.srcLength = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset));
224 offset += sizeof(uint64_t);
225 header.patchOffset = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset));
226 offset += sizeof(uint64_t);
227 header.expandedLen = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset));
228 offset += sizeof(uint64_t);
229 header.targetSize = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset));
230 offset += sizeof(uint64_t);
232 level_ = ReadLE<int32_t>(param.patch + offset);
233 offset += sizeof(int32_t);
234 method_ = ReadLE<int32_t>(param.patch + offset);
235 offset += sizeof(int32_t);
236 windowBits_ = ReadLE<int32_t>(param.patch + offset);
237 offset += sizeof(int32_t);
238 memLevel_ = ReadLE<int32_t>(param.patch + offset);
239 offset += sizeof(int32_t);
240 strategy_ = ReadLE<int32_t>(param.patch + offset);
241 offset += sizeof(int32_t);
268 int32_t Lz4ImagePatch::ReadHeader(const PatchParam ¶m, PatchHeader &header, size_t &offset)
270 if (offset + PATCH_LZ4_MIN_HEADER_LEN > param.patchSize) {
274 header.srcStart = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset));
275 offset += sizeof(uint64_t);
276 header.srcLength = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset));
277 offset += sizeof(uint64_t);
278 header.patchOffset = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset));
279 offset += sizeof(uint64_t);
280 header.expandedLen = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset));
281 offset += sizeof(uint64_t);
282 header.targetSize = static_cast<size_t>(ReadLE<uint64_t>(param.patch + offset));
283 offset += sizeof(uint64_t);
285 compressionLevel_ = static_cast<int32_t>(ReadLE<int32_t>(param.patch + offset));
286 offset += sizeof(int32_t);
287 method_ = static_cast<int32_t>(ReadLE<int32_t>(param.patch + offset));
288 offset += sizeof(int32_t);
289 blockIndependence_ = static_cast<int32_t>(ReadLE<int32_t>(param.patch + offset));
290 offset += sizeof(int32_t);
291 contentChecksumFlag_ = static_cast<int32_t>(ReadLE<int32_t>(param.patch + offset));
292 offset += sizeof(int32_t);
293 blockSizeID_ = static_cast<int32_t>(ReadLE<int32_t>(param.patch + offset));
294 offset += sizeof(int32_t);
295 autoFlush_ = static_cast<int32_t>(ReadLE<int32_t>(param.patch + offset));
296 offset += sizeof(int32_t);