Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7KB

  1. /*
  2. Copyright (c) 1990-2008 Info-ZIP. All rights reserved.
  3. See the accompanying file LICENSE, version 2000-Apr-09 or later
  4. (the contents of which are also included in zip.h) for terms of use.
  5. If, for some reason, all these files are missing, the Info-ZIP license
  6. also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
  7. */
  8. /* crc32.h -- compute the CRC-32 of a data stream
  9. * Copyright (C) 1995 Mark Adler
  10. * For conditions of distribution and use, see copyright notice in zlib.h
  11. */
  12. #ifndef __crc32_h
  13. #define __crc32_h /* identifies this source module */
  14. /* This header should be read AFTER zip.h resp. unzip.h
  15. * (the latter with UNZIP_INTERNAL defined...).
  16. */
  17. #ifndef OF
  18. # define OF(a) a
  19. #endif
  20. #ifndef ZCONST
  21. # define ZCONST const
  22. #endif
  23. #ifdef DYNALLOC_CRCTAB
  24. void free_crc_table OF((void));
  25. #endif
  26. #ifndef USE_ZLIB
  27. ZCONST ulg near *get_crc_table OF((void));
  28. #endif
  29. #if (defined(USE_ZLIB) || defined(CRC_TABLE_ONLY))
  30. # ifdef IZ_CRC_BE_OPTIMIZ
  31. # undef IZ_CRC_BE_OPTIMIZ
  32. # endif
  33. #else /* !(USE_ZLIB || CRC_TABLE_ONLY) */
  34. ulg crc32 OF((ulg crc, ZCONST uch *buf, extent len));
  35. #endif /* ?(USE_ZLIB || CRC_TABLE_ONLY) */
  36. #ifndef CRC_32_TAB
  37. # define CRC_32_TAB crc_32_tab
  38. #endif
  39. #ifdef CRC32
  40. # undef CRC32
  41. #endif
  42. #ifdef IZ_CRC_BE_OPTIMIZ
  43. # define CRC32UPD(c, crctab) (crctab[((c) >> 24)] ^ ((c) << 8))
  44. # define CRC32(c, b, crctab) (crctab[(((int)(c) >> 24) ^ (b))] ^ ((c) << 8))
  45. # define REV_BE(w) (((w)>>24)+(((w)>>8)&0xff00)+ \
  46. (((w)&0xff00)<<8)+(((w)&0xff)<<24))
  47. #else
  48. # define CRC32UPD(c, crctab) (crctab[((int)(c)) & 0xff] ^ ((c) >> 8))
  49. # define CRC32(c, b, crctab) (crctab[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8))
  50. # define REV_BE(w) w
  51. #endif
  52. #endif /* !__crc32_h */