Lines Matching refs:block
73 for (XzBlock& block : blocks_) { in Init()
74 if (!Decompress(&block)) { in Init()
77 memcpy(data.get() + offset, block.decompressed_data.get(), block.decompressed_size); in Init()
78 offset += block.decompressed_size; in Init()
104 XzBlock* block = &blocks_[i]; in Read() local
105 if (block->decompressed_data == nullptr) { in Read()
106 if (!Decompress(block)) { in Read()
111 size_t copy_bytes = std::min<size_t>(size, block->decompressed_size - offset); in Read()
112 memcpy(dst, block->decompressed_data.get() + offset, copy_bytes); in Read()
199 const CXzBlockSizes& block = stream.blocks[b]; in ReadBlocks() local
202 .decompressed_size = static_cast<uint32_t>(block.unpackSize), in ReadBlocks()
204 .compressed_size = static_cast<uint32_t>((block.totalSize + 3) & ~3u), in ReadBlocks()
218 bool MemoryXz::Decompress(XzBlock* block) { in Decompress() argument
224 std::unique_ptr<uint8_t[]> compressed_data(new (std::nothrow) uint8_t[block->compressed_size]); in Decompress()
228 if (!compressed_memory_->ReadFully(compressed_addr_ + block->compressed_offset, in Decompress()
229 compressed_data.get(), block->compressed_size)) { in Decompress()
234 std::unique_ptr<uint8_t[]> decompressed_data(new uint8_t[block->decompressed_size]); in Decompress()
242 state.streamFlags = block->stream_flags; in Decompress()
244 size_t decompressed_size = block->decompressed_size; in Decompress()
245 size_t compressed_size = block->compressed_size; in Decompress()
257 used_ += block->decompressed_size; in Decompress()
258 total_used_ += block->decompressed_size; in Decompress()
265 block->decompressed_data = std::move(decompressed_data); in Decompress()