Lines Matching refs:data
42 return buffer->data; in _zip_buffer_data()
54 free(buffer->data); in _zip_buffer_free()
71 zip_uint8_t *data; in _zip_buffer_get() local
78 data = buffer->data + buffer->offset; in _zip_buffer_get()
80 return data; in _zip_buffer_get()
87 zip_uint8_t *data = _zip_buffer_get(buffer, 2); in _zip_buffer_get_16() local
89 if (data == NULL) { in _zip_buffer_get_16()
93 return (zip_uint16_t)(data[0] + (data[1] << 8)); in _zip_buffer_get_16()
100 zip_uint8_t *data = _zip_buffer_get(buffer, 4); in _zip_buffer_get_32() local
102 if (data == NULL) { in _zip_buffer_get_32()
106 return ((((((zip_uint32_t)data[3] << 8) + data[2]) << 8) + data[1]) << 8) + data[0]; in _zip_buffer_get_32()
113 zip_uint8_t *data = _zip_buffer_get(buffer, 8); in _zip_buffer_get_64() local
115 if (data == NULL) { in _zip_buffer_get_64()
119 …data[7] << 56) + ((zip_uint64_t)data[6] << 48) + ((zip_uint64_t)data[5] << 40) + ((zip_uint64_t)da… in _zip_buffer_get_64()
127 zip_uint8_t *data = _zip_buffer_get(buffer, 1); in _zip_buffer_get_8() local
129 if (data == NULL) { in _zip_buffer_get_8()
133 return data[0]; in _zip_buffer_get_8()
145 _zip_buffer_new(zip_uint8_t *data, zip_uint64_t size) in _zip_buffer_new() argument
147 bool free_data = (data == NULL); in _zip_buffer_new()
150 if (data == NULL) { in _zip_buffer_new()
151 if ((data = (zip_uint8_t *)malloc(size)) == NULL) { in _zip_buffer_new()
158 free(data); in _zip_buffer_new()
164 buffer->data = data; in _zip_buffer_new()
183 if (_zip_read(src, buffer->data, size, error) < 0) { in _zip_buffer_new_from_source()
223 zip_uint8_t *data = _zip_buffer_get(buffer, 2); in _zip_buffer_put_16() local
225 if (data == NULL) { in _zip_buffer_put_16()
229 data[0] = (zip_uint8_t)(i & 0xff); in _zip_buffer_put_16()
230 data[1] = (zip_uint8_t)((i >> 8) & 0xff); in _zip_buffer_put_16()
239 zip_uint8_t *data = _zip_buffer_get(buffer, 4); in _zip_buffer_put_32() local
241 if (data == NULL) { in _zip_buffer_put_32()
245 data[0] = (zip_uint8_t)(i & 0xff); in _zip_buffer_put_32()
246 data[1] = (zip_uint8_t)((i >> 8) & 0xff); in _zip_buffer_put_32()
247 data[2] = (zip_uint8_t)((i >> 16) & 0xff); in _zip_buffer_put_32()
248 data[3] = (zip_uint8_t)((i >> 24) & 0xff); in _zip_buffer_put_32()
257 zip_uint8_t *data = _zip_buffer_get(buffer, 8); in _zip_buffer_put_64() local
259 if (data == NULL) { in _zip_buffer_put_64()
263 data[0] = (zip_uint8_t)(i & 0xff); in _zip_buffer_put_64()
264 data[1] = (zip_uint8_t)((i >> 8) & 0xff); in _zip_buffer_put_64()
265 data[2] = (zip_uint8_t)((i >> 16) & 0xff); in _zip_buffer_put_64()
266 data[3] = (zip_uint8_t)((i >> 24) & 0xff); in _zip_buffer_put_64()
267 data[4] = (zip_uint8_t)((i >> 32) & 0xff); in _zip_buffer_put_64()
268 data[5] = (zip_uint8_t)((i >> 40) & 0xff); in _zip_buffer_put_64()
269 data[6] = (zip_uint8_t)((i >> 48) & 0xff); in _zip_buffer_put_64()
270 data[7] = (zip_uint8_t)((i >> 56) & 0xff); in _zip_buffer_put_64()
279 zip_uint8_t *data = _zip_buffer_get(buffer, 1); in _zip_buffer_put_8() local
281 if (data == NULL) { in _zip_buffer_put_8()
285 data[0] = i; in _zip_buffer_put_8()