bzversion.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * THIS FILE IS NOT IDENTICAL TO THE ORIGINAL
  3. * FROM THE BZIP2 DISTRIBUTION.
  4. *
  5. * It has been modified, mainly to break the library
  6. * into smaller pieces.
  7. *
  8. * Russ Cox
  9. * rsc@plan9.bell-labs.com
  10. * July 2000
  11. */
  12. /*-------------------------------------------------------------*/
  13. /*--- Library top-level functions. ---*/
  14. /*--- bzlib.c ---*/
  15. /*-------------------------------------------------------------*/
  16. /*--
  17. This file is a part of bzip2 and/or libbzip2, a program and
  18. library for lossless, block-sorting data compression.
  19. Copyright (C) 1996-2000 Julian R Seward. All rights reserved.
  20. Redistribution and use in source and binary forms, with or without
  21. modification, are permitted provided that the following conditions
  22. are met:
  23. 1. Redistributions of source code must retain the above copyright
  24. notice, this list of conditions and the following disclaimer.
  25. 2. The origin of this software must not be misrepresented; you must
  26. not claim that you wrote the original software. If you use this
  27. software in a product, an acknowledgment in the product
  28. documentation would be appreciated but is not required.
  29. 3. Altered source versions must be plainly marked as such, and must
  30. not be misrepresented as being the original software.
  31. 4. The name of the author may not be used to endorse or promote
  32. products derived from this software without specific prior written
  33. permission.
  34. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
  35. OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  36. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  37. ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  38. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  39. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  40. GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  41. INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  42. WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  43. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  44. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  45. Julian Seward, Cambridge, UK.
  46. jseward@acm.org
  47. bzip2/libbzip2 version 1.0 of 21 March 2000
  48. This program is based on (at least) the work of:
  49. Mike Burrows
  50. David Wheeler
  51. Peter Fenwick
  52. Alistair Moffat
  53. Radford Neal
  54. Ian H. Witten
  55. Robert Sedgewick
  56. Jon L. Bentley
  57. For more information on these sources, see the manual.
  58. --*/
  59. /*--
  60. CHANGES
  61. ~~~~~~~
  62. 0.9.0 -- original version.
  63. 0.9.0a/b -- no changes in this file.
  64. 0.9.0c
  65. * made zero-length BZ_FLUSH work correctly in bzCompress().
  66. * fixed bzWrite/bzRead to ignore zero-length requests.
  67. * fixed bzread to correctly handle read requests after EOF.
  68. * wrong parameter order in call to bzDecompressInit in
  69. bzBuffToBuffDecompress. Fixed.
  70. --*/
  71. #include "os.h"
  72. #include "bzlib.h"
  73. #include "bzlib_private.h"
  74. /*---------------------------------------------------*/
  75. /*--
  76. return version like "0.9.0c".
  77. --*/
  78. const char * BZ_API(BZ2_bzlibVersion)(void)
  79. {
  80. return BZ_VERSION;
  81. }