• Home
  • Raw
  • Download

Lines Matching refs:buffer

65 void GZipFileEntry::GetUpGradeCompInfo(size_t &offset, PkgBuffer &buffer)  in GetUpGradeCompInfo()  argument
67 GZipHeader *header = (GZipHeader *)buffer.buffer; in GetUpGradeCompInfo()
76 WriteLE16(buffer.buffer + offset, EXTRA_FIELD_LEN); in GetUpGradeCompInfo()
84 … fileInfo_.fileInfo.identity, {buffer.buffer + offset, buffer.length - offset}, fileNameLen); in GetUpGradeCompInfo()
86 buffer.buffer[offset] = 0; in GetUpGradeCompInfo()
94 … fileInfo_.fileInfo.identity, {buffer.buffer + offset, buffer.length - offset}, fileNameLen); in GetUpGradeCompInfo()
96 buffer.buffer[offset] = 0; in GetUpGradeCompInfo()
111 PkgBuffer buffer(BUFFER_SIZE); in EncodeHeader() local
113 GetUpGradeCompInfo(offset, buffer); in EncodeHeader()
117 int32_t ret = outStream->Write(buffer, offset, startOffset); in EncodeHeader()
157 PkgBuffer buffer(BLOCK_SIZE); in Pack() local
158 WriteLE32(buffer.buffer, context.crc); in Pack()
159 WriteLE32(buffer.buffer + sizeof(uint32_t), fileInfo_.fileInfo.unpackedSize); in Pack()
160 …ret = outStream->Write(buffer, BLOCK_SIZE, fileInfo_.fileInfo.dataOffset + fileInfo_.fileInfo.pack… in Pack()
175 PkgBuffer buffer(BLOCK_SIZE); // Read last 8 bytes at the end of package in CheckFileInfo() local
176 …int32_t ret = inStream->Read(buffer, context.packedSize + fileInfo_.fileInfo.dataOffset, BLOCK_SIZ… in CheckFileInfo()
181 crc32_ = ReadLE32(buffer.buffer); in CheckFileInfo()
182 fileInfo_.fileInfo.unpackedSize = ReadLE32(buffer.buffer + sizeof(uint32_t)); in CheckFileInfo()
236 void GZipFileEntry::DecodeHeaderCalOffset(uint8_t flags, const PkgBuffer &buffer, size_t &offset, in DecodeHeaderCalOffset() argument
240 uint16_t extLen = ReadLE16(buffer.buffer + offset); in DecodeHeaderCalOffset()
244 … PkgFileImpl::ConvertBufferToString(fileName, {buffer.buffer + offset, buffer.length - offset}); in DecodeHeaderCalOffset()
249 … PkgFileImpl::ConvertBufferToString(comment, {buffer.buffer + offset, buffer.length - offset}); in DecodeHeaderCalOffset()
258 int32_t GZipFileEntry::DecodeHeader(PkgBuffer &buffer, size_t headerOffset, size_t dataOffset, in DecodeHeader() argument
263 if (inStream == nullptr || buffer.buffer == nullptr) { in DecodeHeader()
270 uint8_t flags = *(buffer.buffer + offsetof(GZipHeader, flags)); in DecodeHeader()
272 DecodeHeaderCalOffset(flags, buffer, offset, fileName_); in DecodeHeader()
295 int32_t ret = inStream->Read(buffer, blockOffset, buffer.length, readLen); in DecodeHeader()
301 fileInfo_.fileInfo.unpackedSize = ReadLE32(buffer.buffer + sizeof(uint32_t)); in DecodeHeader()
366 PkgBuffer buffer(nullptr, BUFFER_SIZE); in LoadPackage() local
367 int32_t ret = pkgStream_->Read(buffer, srcOffset, buffer.length, readLen); in LoadPackage()
374 GZipHeader *header = (GZipHeader *)buffer.buffer; in LoadPackage()
394 ret = entry->DecodeHeader(buffer, srcOffset, srcOffset, readLen); in LoadPackage()