Lines Matching defs:buffer
103 bool LoadTarget(const Command ¶ms, size_t &pos, std::vector<uint8_t> &buffer,
114 // Read the target's buffer to determine whether it needs to be written
133 buffer.resize(srcBlockSize * H_BLOCK_SIZE);
134 if (targetBlock.LoadTargetBuffer(params, buffer, srcBlockSize, pos, srcHash) != 0) {
159 std::vector<uint8_t> buffer;
161 if (!LoadTarget(params, pos, buffer, targetBlock, result)) {
174 ret = WriteDiffToBlock(params, buffer, patchBuffer, patchLength, targetBlock);
176 ret = targetBlock.WriteDataToBlock(params.GetFileDescriptor(), buffer) == 0 ? -1 : 0;
212 std::vector<uint8_t> buffer;
213 buffer.resize(srcBlockSize * H_BLOCK_SIZE);
216 if (Store::LoadDataFromStore(storeBase, shaStr, buffer) == 0) {
220 LOG(DEBUG) << "Read block data to buffer";
221 if (srcBlk.ReadDataFromBlock(params.GetFileDescriptor(), buffer) == 0) {
225 int32_t res = srcBlk.VerifySha256(buffer, srcBlockSize, shaStr);
227 res = BlockVerify(params, buffer, srcBlockSize, shaStr, pos);
234 int ret = Store::WriteDataToStore(storeBase, shaStr, buffer, srcBlockSize * H_BLOCK_SIZE);