Lines Matching refs:length
197 static bool AlignHead(size_t* start, size_t* length) { in AlignHead() argument
200 if (*length <= residual) { in AlignHead()
201 *length = 0; in AlignHead()
207 *length -= residual; in AlignHead()
211 static bool AlignTail(size_t* start, size_t* length) { in AlignTail() argument
212 size_t residual = (*start + *length) % BLOCK_SIZE; in AlignTail()
213 if (*length <= residual) { in AlignTail()
214 *length = 0; in AlignTail()
219 *length -= residual; in AlignTail()
226 static bool RemoveUsedBlocks(size_t* start, size_t* length, const SortedRangeSet& used_ranges) { in RemoveUsedBlocks() argument
227 if (!used_ranges.Overlaps(*start, *length)) { in RemoveUsedBlocks()
233 << *start + *length - 1; in RemoveUsedBlocks()
237 if (AlignHead(start, length) && !used_ranges.Overlaps(*start, *length)) { in RemoveUsedBlocks()
240 if (AlignTail(start, length) && !used_ranges.Overlaps(*start, *length)) { in RemoveUsedBlocks()
769 size_t length = std::min(limit_, compressed_len); in AddZipEntryToChunks() local
771 chunks_.emplace_back(CHUNK_NORMAL, entry->offset + limit_ * count, &file_content_, length, in AddZipEntryToChunks()
775 compressed_len -= length; in AddZipEntryToChunks()