zlib.cpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #include "api.h"
  2. extern "C"
  3. {
  4. extern "C" {
  5. int inflateReset(void *strm)
  6. {
  7. if (WASABI_API_INFLATE) return WASABI_API_INFLATE->inflateReset(strm);
  8. return -4;
  9. }
  10. int inflateInit_(void *strm,const char *version, int stream_size)
  11. {
  12. if (WASABI_API_INFLATE) return WASABI_API_INFLATE->inflateInit_(strm,version,stream_size);
  13. return -4;
  14. }
  15. int inflate(void *strm, int flush)
  16. {
  17. if (WASABI_API_INFLATE) return WASABI_API_INFLATE->inflate(strm,flush);
  18. return -4;
  19. }
  20. int inflateEnd(void *strm)
  21. {
  22. if (WASABI_API_INFLATE) return WASABI_API_INFLATE->inflateEnd(strm);
  23. return -2;
  24. }
  25. unsigned long crc32(unsigned long crc, const unsigned char *buf, unsigned int len)
  26. {
  27. if (WASABI_API_INFLATE) return WASABI_API_INFLATE->crc32(crc,buf,len);
  28. return 0;
  29. }
  30. int deflateReset(void * strm)
  31. {
  32. if (WASABI_API_INFLATE) return WASABI_API_INFLATE->deflateReset(strm);
  33. return -4;
  34. }
  35. int deflateInit2_(void * strm, int level, int method, int windowBits, int memLevel, int strategy, const char *version, int stream_size)
  36. {
  37. if (WASABI_API_INFLATE) return WASABI_API_INFLATE->deflateInit2_(strm, level, method, windowBits, memLevel, strategy, version, stream_size);
  38. return -4;
  39. }
  40. int deflate(void * strm, int flush)
  41. {
  42. if (WASABI_API_INFLATE) return WASABI_API_INFLATE->deflate(strm, flush);
  43. return -2;
  44. }
  45. int deflateEnd(void * strm)
  46. {
  47. if (WASABI_API_INFLATE) return WASABI_API_INFLATE->deflateEnd(strm);
  48. return -4;
  49. }
  50. };
  51. }