neginf_conf.h 855 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * neginf_conf.h
  3. * neginf -- embedded inflate lib
  4. *
  5. * configuration header file
  6. */
  7. #ifndef NEGINF_CONF_H
  8. #define NEGINF_CONF_H
  9. #include <stddef.h>
  10. #include <stdint.h>
  11. #define NEGINF_USE_SEQ_WRITES
  12. //#define NEGINF_USE_REL_COPY
  13. //#define NEGINF_POS_TRACKING
  14. //#define NEGINF_8BIT
  15. #define NEGINF_PACKED_STATE
  16. #ifdef NEGINF_8BIT
  17. typedef char nbool;
  18. typedef uint8_t nbyte;
  19. typedef uint8_t ntiny;
  20. typedef uint16_t nint;
  21. typedef uint32_t nbuf;
  22. typedef uint32_t nsize;
  23. #else
  24. typedef int nbool; // boolean
  25. typedef uint8_t nbyte; // has to be exaclty 8 bit, unsigned
  26. typedef unsigned int ntiny; // has to be at least 8 bit, unsigned
  27. typedef unsigned int nint; // has to be at least 16 bit, unsigned
  28. typedef unsigned int nbuf; // has to be at least 24 bit, unsigned
  29. typedef size_t nsize; // has be at least 24 bit, unsigned
  30. #endif
  31. #endif