Lines Matching defs:chunk

78 		// might refer to the last chunk
83 // no, need to push a new chunk
86 Chunk chunk;
87 chunk.offset = chunkOffset;
88 chunk.compressedSize = compressedSize;
89 chunk.uncompressedSize = uncompressedSize;
90 chunk.buffer = NULL;
91 if (!fChunks.Add(chunk))
138 Chunk& chunk = fChunks[fNextReadIndex++];
139 chunk.buffer = _GetBuffer();
141 status_t error = fWriter->ReadFileData(chunk.offset, chunk.buffer,
142 chunk.compressedSize);
149 // Unless the next segment refers to the same chunk, advance to the next
150 // chunk.
324 // We potentially have to recompress all data from the first affected chunk
326 // can use our usual data writing strategy, i.e. read a chunk, decompress it
331 // making sure our reading end is at least a complete uncompressed chunk
339 // the first partial chunk (if any) and all chunks between ranges
379 // If we have an aligned, complete chunk, copy its compressed data.
391 // read chunk
395 // copy compressed chunk data, if possible
396 const Chunk& chunk = chunkBuffer.ChunkAt(segment.chunkIndex);
398 status_t error = _WriteChunk(chunk.buffer, chunk.compressedSize,
405 // decompress chunk, if compressed
407 if (chunk.uncompressedSize == chunk.compressedSize) {
408 uncompressedData = chunk.buffer;
409 } else if (decompressedChunk == &chunk) {
412 status_t error = DecompressChunkData(chunk.buffer,
413 chunk.compressedSize, decompressionBuffer,
414 chunk.uncompressedSize);
418 decompressedChunk = &chunk;
422 // add chunk data
429 // Make sure a last partial chunk ends up in the pending data buffer. This
430 // is only necessary when we didn't have to move any chunk segments, since
446 // write chunk sizes table
452 // We don't need to write the last chunk size, since it is implied by the
453 // total size minus the sum of all other chunk sizes.
485 // The chunk has not been written to disk yet. Its data are still in the
571 fErrorOutput->PrintError("Failed to compress chunk data: %s\n",
644 // If the last chunk is partial, read it in and remove it from the offsets.