X-Git-Url: https://pd.if.org/git/?p=zpackage;a=blobdiff_plain;f=zpm.h;h=1b619869255c351649f6571b577383e6ad64b569;hp=98971c126bb64adc45deb0cea274c2949addbb00;hb=2ac486ab18adbbb84563eafc0d67fa8da6ca7822;hpb=4fb490d9107b747c86964d0d3925470b06d97c8c diff --git a/zpm.h b/zpm.h index 98971c1..1b61986 100644 --- a/zpm.h +++ b/zpm.h @@ -192,10 +192,16 @@ int zpm_checkinstall(struct zpm *local); 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 {