int zpm_merge(struct zpm *z, struct zpm *src, uint32_t flags);
ssize_t uncompresslzma(void *buf, size_t bufsize, int outfd);
+ssize_t zpm_uncompress_cb(void *buf, size_t bufsize, void *cbdata,
+ int (*cb)(void *ud, void *buf, size_t bufsize));
void *compresslzma(void *buf, size_t bufsize, size_t *len);
#define SQLERROR(x) fprintf(stderr, "%s %d: %s\n", __func__, __LINE__, (x))
int zpm_hash(char *path, char *hash, uint32_t flags);
+
+/* hex encoded hash, not null terminated */
+int zpm_hash_mem(void *mem, size_t size, char *hash);
+
int zpm_readopts(struct zpm *pkg, int ac, char **av);
+struct zpm_version_info {
+ const char *verstr;
+ const char *name; int namelen;
+ const char *version; int verlen;
+ const char *relstr; int rellen;
+ int release;
+};
+
+int zpm_parse_version(const char *pstr, struct zpm_version_info *info);
int zpm_vercmp(const char *a, const char *b);
/* add vercmp collation to db */