print_versions.c 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. /*********************************************************************
  2. Print versions for Blosc and all its internal compressors.
  3. *********************************************************************/
  4. #include <stdlib.h>
  5. #include <stdio.h>
  6. #include <string.h>
  7. #include "../blosc/blosc.h"
  8. int main(int argc, char *argv[]) {
  9. char *name = NULL, *version = NULL;
  10. int ret;
  11. printf("Blosc version: %s (%s)\n", BLOSC_VERSION_STRING, BLOSC_VERSION_DATE);
  12. printf("List of supported compressors in this build: %s\n",
  13. blosc_list_compressors());
  14. printf("Supported compression libraries:\n");
  15. ret = blosc_get_complib_info("blosclz", &name, &version);
  16. if (ret >= 0) printf(" %s: %s\n", name, version);
  17. ret = blosc_get_complib_info("lz4", &name, &version);
  18. if (ret >= 0) printf(" %s: %s\n", name, version);
  19. ret = blosc_get_complib_info("snappy", &name, &version);
  20. if (ret >= 0) printf(" %s: %s\n", name, version);
  21. ret = blosc_get_complib_info("zlib", &name, &version);
  22. if (ret >= 0) printf(" %s: %s\n", name, version);
  23. return(0);
  24. }