Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 6 of 6) sorted by relevance

/build/tools/zipalign/
DZipEntry.cpp405 unsigned char buf[kLFHLen]; in read() local
410 if (fread(buf, 1, kLFHLen, fp) != kLFHLen) { in read()
415 if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) { in read()
421 mVersionToExtract = ZipEntry::getShortLE(&buf[0x04]); in read()
422 mGPBitFlag = ZipEntry::getShortLE(&buf[0x06]); in read()
423 mCompressionMethod = ZipEntry::getShortLE(&buf[0x08]); in read()
424 mLastModFileTime = ZipEntry::getShortLE(&buf[0x0a]); in read()
425 mLastModFileDate = ZipEntry::getShortLE(&buf[0x0c]); in read()
426 mCRC32 = ZipEntry::getLongLE(&buf[0x0e]); in read()
427 mCompressedSize = ZipEntry::getLongLE(&buf[0x12]); in read()
[all …]
DZipEntry.h111 static inline unsigned short getShortLE(const unsigned char* buf) { in getShortLE() argument
112 return buf[0] | (buf[1] << 8); in getShortLE()
114 static inline unsigned long getLongLE(const unsigned char* buf) { in getLongLE() argument
115 return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24); in getLongLE()
117 static inline void putShortLE(unsigned char* buf, short val) { in putShortLE() argument
118 buf[0] = (unsigned char) val; in putShortLE()
119 buf[1] = (unsigned char) (val >> 8); in putShortLE()
121 static inline void putLongLE(unsigned char* buf, long val) { in putLongLE() argument
122 buf[0] = (unsigned char) val; in putLongLE()
123 buf[1] = (unsigned char) (val >> 8); in putLongLE()
[all …]
DZipFile.cpp209 unsigned char* buf = NULL; in readCentralDir() local
225 buf = new unsigned char[EndOfCentralDir::kMaxEOCDSearch]; in readCentralDir()
226 if (buf == NULL) { in readCentralDir()
247 if (fread(buf, 1, readAmount, mZipFp) != (size_t) readAmount) { in readCentralDir()
255 if (buf[i] == 0x50 && in readCentralDir()
256 ZipEntry::getLongLE(&buf[i]) == EndOfCentralDir::kSignature) in readCentralDir()
269 result = mEOCD.readBuf(buf + i, readAmount - i); in readCentralDir()
343 delete[] buf; in readCentralDir()
707 void *buf = pSourceZip->uncompress(pSourceEntry); in addRecompress() local
708 if (buf == NULL) { in addRecompress()
[all …]
DZipFile.h197 status_t readBuf(const unsigned char* buf, int len);
/build/tools/atree/
Dfiles.cpp186 char* buf = NULL; in read_list_file() local
216 buf = (char*)malloc(size+1); in read_list_file()
217 if (buf == NULL) { in read_list_file()
224 if (1 != fread(buf, size, 1, f)) { in read_list_file()
232 p = buf; in read_list_file()
233 q = buf+size; in read_list_file()
244 p = buf; in read_list_file()
320 if (buf != NULL) { in read_list_file()
321 free(buf); in read_list_file()
/build/libs/host/
DCopyFile.c118 unsigned char buf[8192]; in copyFileContents() local
125 readCount = read(srcFd, buf, sizeof(buf)); in copyFileContents()
133 writeCount = write(dstFd, buf, readCount); in copyFileContents()
146 if (readCount < (ssize_t) sizeof(buf)) in copyFileContents()