}
}
+zzip_size_t
+zzip_pread(ZZIP_FILE *file, void *ptr, zzip_size_t size, zzip_off_t offset)
+{
+ zzip_off_t new_offset = zzip_seek(file, offset, SEEK_SET);
+ if (new_offset < 0)
+ return -1;
+
+ return zzip_read(file, ptr, size);
+}
+
/** => zzip_read
*/
zzip_size_t
_zzip_export
zzip_ssize_t zzip_read(ZZIP_FILE * fp, void * buf, zzip_size_t len);
+/*
+ * Read data from the specified offset. Depending on the
+ * implementation, this may or may not move the file pointer.
+ */
+_zzip_export
+zzip_size_t
+zzip_pread(ZZIP_FILE *file, void *ptr, zzip_size_t size, zzip_off_t offset);
+
/*
* the stdc variant to open/read/close files. - Take note of the freopen()
* call as it may reuse an existing preparsed copy of a zip central directory