3
0

bzlib.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * bzip2 is written by Julian Seward <jseward@bzip.org>.
  3. * Adapted for busybox by Denys Vlasenko <vda.linux@googlemail.com>.
  4. * See README and LICENSE files in this directory for more information.
  5. */
  6. /*-------------------------------------------------------------*/
  7. /*--- Public header file for the library. ---*/
  8. /*--- bzlib.h ---*/
  9. /*-------------------------------------------------------------*/
  10. /* ------------------------------------------------------------------
  11. This file is part of bzip2/libbzip2, a program and library for
  12. lossless, block-sorting data compression.
  13. bzip2/libbzip2 version 1.0.4 of 20 December 2006
  14. Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org>
  15. Please read the WARNING, DISCLAIMER and PATENTS sections in the
  16. README file.
  17. This program is released under the terms of the license contained
  18. in the file LICENSE.
  19. ------------------------------------------------------------------ */
  20. #define BZ_RUN 0
  21. #define BZ_FLUSH 1
  22. #define BZ_FINISH 2
  23. #define BZ_OK 0
  24. #define BZ_RUN_OK 1
  25. #define BZ_FLUSH_OK 2
  26. #define BZ_FINISH_OK 3
  27. #define BZ_STREAM_END 4
  28. #define BZ_SEQUENCE_ERROR (-1)
  29. #define BZ_PARAM_ERROR (-2)
  30. #define BZ_MEM_ERROR (-3)
  31. #define BZ_DATA_ERROR (-4)
  32. #define BZ_DATA_ERROR_MAGIC (-5)
  33. #define BZ_IO_ERROR (-6)
  34. #define BZ_UNEXPECTED_EOF (-7)
  35. #define BZ_OUTBUFF_FULL (-8)
  36. #define BZ_CONFIG_ERROR (-9)
  37. typedef struct bz_stream {
  38. void *state;
  39. char *next_in;
  40. char *next_out;
  41. unsigned avail_in;
  42. unsigned avail_out;
  43. /*unsigned long long total_in;*/
  44. unsigned long long total_out;
  45. } bz_stream;
  46. /*-- Core (low-level) library functions --*/
  47. static void BZ2_bzCompressInit(bz_stream *strm, int blockSize100k);
  48. static int BZ2_bzCompress(bz_stream *strm, int action);
  49. #if ENABLE_FEATURE_CLEAN_UP
  50. static void BZ2_bzCompressEnd(bz_stream *strm);
  51. #endif
  52. /*-------------------------------------------------------------*/
  53. /*--- end bzlib.h ---*/
  54. /*-------------------------------------------------------------*/