Lines Matching refs:size_t
175 static constexpr size_t VERSION = 2;
180 static constexpr size_t BLOCK_SIZE = 4096;
181 static constexpr size_t BUFFER_SIZE = 0x8000;
197 static bool AlignHead(size_t* start, size_t* length) { in AlignHead()
198 size_t residual = (*start % BLOCK_SIZE == 0) ? 0 : BLOCK_SIZE - *start % BLOCK_SIZE; in AlignHead()
211 static bool AlignTail(size_t* start, size_t* length) { in AlignTail()
212 size_t residual = (*start + *length) % BLOCK_SIZE; in AlignTail()
226 static bool RemoveUsedBlocks(size_t* start, size_t* length, const SortedRangeSet& used_ranges) { in RemoveUsedBlocks()
258 ImageChunk::ImageChunk(int type, size_t start, const std::vector<uint8_t>* file_content, in ImageChunk()
259 size_t raw_data_len, std::string entry_name) in ImageChunk()
281 size_t ImageChunk::DataLengthForPatch() const { in DataLengthForPatch()
288 void ImageChunk::Dump(size_t index) const { in Dump()
366 size_t sz = static_cast<size_t>(st.st_size); in MakePatch()
417 size_t offset = 0; in TryReconstruction()
427 size_t compressed_size = buffer.size() - strm.avail_out; in TryReconstruction()
468 bool PatchChunk::RawDataIsSmaller(const ImageChunk& tgt, size_t patch_size) { in RawDataIsSmaller()
469 size_t target_len = tgt.GetRawDataLength(); in RawDataIsSmaller()
484 size_t PatchChunk::GetHeaderSize() const { in GetHeaderSize()
499 size_t PatchChunk::WriteHeaderToFd(int fd, size_t offset, size_t index) const { in WriteHeaderToFd()
537 size_t PatchChunk::PatchSize() const { in PatchSize()
548 size_t total_header_size = 12; in WritePatchDataToFd()
553 size_t offset = total_header_size; in WritePatchDataToFd()
563 for (size_t i = 0; i < patch_chunks.size(); ++i) { in WritePatchDataToFd()
581 ImageChunk& Image::operator[](size_t i) { in operator []()
586 const ImageChunk& Image::operator[](size_t i) const { in operator []()
592 size_t merged_last = 0, cur = 0; in MergeAdjacentNormalChunks()
596 size_t to_check = cur + 1; in MergeAdjacentNormalChunks()
616 for (size_t i = 0; i < chunks_.size(); ++i) { in DumpChunks()
635 size_t sz = static_cast<size_t>(st.st_size); in ReadFile()
652 size_t zipfile_size; in Initialize()
713 size_t entries_end = 0; in InitializeChunks()
715 entries_end = static_cast<size_t>(temp_entries.back().second.offset + in InitializeChunks()
727 size_t pos = 0; in InitializeChunks()
728 size_t nextentry = 0; in InitializeChunks()
745 size_t raw_data_len; in InitializeChunks()
761 size_t compressed_len = entry->compressed_length; in AddZipEntryToChunks()
768 size_t length = std::min(limit_, compressed_len); in AddZipEntryToChunks()
777 size_t uncompressed_len = entry->uncompressed_length; in AddZipEntryToChunks()
801 bool ZipModeImage::GetZipFileSize(size_t* input_file_size) { in GetZipFileSize()
816 size_t file_size = i + 22 + comment_length; in GetZipFileSize()
909 size_t limit = tgt_image.limit_; in SplitZipModeImageWithLimit()
933 size_t src_offset = src->GetStartOffset(); in SplitZipModeImageWithLimit()
934 size_t src_length = src->GetRawDataLength(); in SplitZipModeImageWithLimit()
1003 size_t i = 0; in AddSplitImageFromChunkList()
1005 size_t tgt_start = split_tgt_chunks[i].GetStartOffset(); in AddSplitImageFromChunkList()
1006 size_t tgt_length = split_tgt_chunks[i].GetRawDataLength(); in AddSplitImageFromChunkList()
1028 size_t end_offset = in AddSplitImageFromChunkList()
1031 size_t tail_block_length = std::min<size_t>(tgt_image.file_content_.size() - end_offset, in AddSplitImageFromChunkList()
1044 size_t end = std::min(src_image.file_content_.size(), r.second * BLOCK_SIZE); in AddSplitImageFromChunkList()
1066 size_t total_tgt_size) { in ValidateSplitImages()
1072 size_t last_offset = 0; in ValidateSplitImages()
1090 for (size_t i = 0; i < split_src_ranges.size(); i++) { in ValidateSplitImages()
1105 for (size_t i = 0; i < tgt_image.NumOfChunks(); i++) { in GeneratePatchesInternal()
1176 for (size_t i = 0; i < split_tgt_images.size(); i++) { in GeneratePatches()
1184 size_t total_patch_size = 12; in GeneratePatches()
1194 size_t split_tgt_size = split_tgt_images[i].chunks_.back().GetStartOffset() + in GeneratePatches()
1251 size_t sz = file_content_.size(); in Initialize()
1252 size_t pos = 0; in Initialize()
1257 size_t chunk_offset = pos; in Initialize()
1288 size_t allocated = BUFFER_SIZE; in Initialize()
1290 size_t uncompressed_len = 0, raw_data_len = 0; in Initialize()
1316 size_t footer_index = pos + raw_data_len + GZIP_FOOTER_LEN - 4; in Initialize()
1321 size_t footer_size = get_unaligned<uint32_t>(file_content_.data() + footer_index); in Initialize()
1344 size_t data_len = 0; in Initialize()
1386 for (size_t i = 0; i < tgt_image->NumOfChunks(); ++i) { in CheckAndProcessChunks()
1395 for (size_t i = 0; i < tgt_image->NumOfChunks(); ++i) { in CheckAndProcessChunks()
1438 for (size_t i = 0; i < tgt_image.NumOfChunks(); i++) { in GeneratePatches()
1478 size_t blocks_limit = 0; in imgdiff()
1504 size_t bonus_size = st.st_size; in imgdiff()