Skip to content

Instantly share code, notes, and snippets.

@weltling
Created March 17, 2017 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weltling/8ef2ec435add3c717041e0db38460e43 to your computer and use it in GitHub Desktop.
Save weltling/8ef2ec435add3c717041e0db38460e43 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <zip.h>
int
main(int argc, char **argv)
{
int err;
struct zip *z = zip_open("test_procedural.zip", 0, &err);
struct zip_stat st;
printf("zip_stat_t %u\n", sizeof(zip_stat_t));
err = zip_stat_index(z, 0, 0, &st);
printf("comp_method %d\n", st.comp_method);
err = zip_stat_index(z, 1, 0, &st);
printf("comp_method %d\n", st.comp_method);
err = zip_stat_index(z, 2, 0, &st);
printf("comp_method %d\n", st.comp_method);
err = zip_stat_index(z, 3, 0, &st);
printf("comp_method %d\n", st.comp_method);
zip_close(z);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment