Lines Matching refs:buf
22 read_le_int(const unsigned char* buf)
24 return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
28 read_le_short(const unsigned char* buf)
30 return buf[0] | (buf[1] << 8);
34 read_central_dir_values(Zipfile* file, const unsigned char* buf, int len)
43 file->disknum = read_le_short(&buf[0x04]);
44 file->diskWithCentralDir = read_le_short(&buf[0x06]);
45 file->entryCount = read_le_short(&buf[0x08]);
46 file->totalEntryCount = read_le_short(&buf[0x0a]);
47 file->centralDirSize = read_le_int(&buf[0x0c]);
48 file->centralDirOffest = read_le_int(&buf[0x10]);
49 file->commentLen = read_le_short(&buf[0x14]);
57 file->comment = buf + EOCD_LEN;
65 const unsigned char** buf, ssize_t* len)
88 p = *buf;
143 *buf = p;
147 p = file->buf + localHeaderRelOffset;
152 entry->data = file->buf + dataOffset;
154 printf("file->buf=%p entry->data=%p dataOffset=%x localHeaderRelOffset=%d "
156 file->buf, entry->data, dataOffset, localHeaderRelOffset,
185 const unsigned char* buf = file->buf;
201 start = buf + bufsize - MAX_EOCD_SEARCH;
203 start = buf;
205 p = buf + bufsize - 4;
219 err = read_central_dir_values(file, eocd, (buf+bufsize)-eocd);
232 p = buf + file->centralDirOffest;
233 len = (buf+bufsize)-p;