diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/libbz2 | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) | |
download | ydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/libbz2')
-rw-r--r-- | contrib/libs/libbz2/LICENSE | 78 | ||||
-rw-r--r-- | contrib/libs/libbz2/README | 372 | ||||
-rw-r--r-- | contrib/libs/libbz2/README.XML.STUFF | 86 | ||||
-rw-r--r-- | contrib/libs/libbz2/bzlib.h | 166 | ||||
-rw-r--r-- | contrib/libs/libbz2/bzlib_private.h | 26 | ||||
-rw-r--r-- | contrib/libs/libbz2/compress.c | 12 | ||||
-rw-r--r-- | contrib/libs/libbz2/crctable.c | 2 | ||||
-rw-r--r-- | contrib/libs/libbz2/decompress.c | 40 | ||||
-rw-r--r-- | contrib/libs/libbz2/randtable.c | 104 | ||||
-rw-r--r-- | contrib/libs/libbz2/ya.make | 26 |
10 files changed, 456 insertions, 456 deletions
diff --git a/contrib/libs/libbz2/LICENSE b/contrib/libs/libbz2/LICENSE index 4cb726c814..81a37eab7a 100644 --- a/contrib/libs/libbz2/LICENSE +++ b/contrib/libs/libbz2/LICENSE @@ -1,42 +1,42 @@ - --------------------------------------------------------------------------- - -This program, "bzip2", the associated library "libbzip2", and all + +-------------------------------------------------------------------------- + +This program, "bzip2", the associated library "libbzip2", and all documentation, are copyright (C) 1996-2019 Julian R Seward. All -rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - -3. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - -4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - +rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + +3. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + +4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + Julian Seward, jseward@acm.org bzip2/libbzip2 version 1.0.8 of 13 July 2019 - --------------------------------------------------------------------------- + +-------------------------------------------------------------------------- diff --git a/contrib/libs/libbz2/README b/contrib/libs/libbz2/README index e0b6d4d3de..b9c6099fd1 100644 --- a/contrib/libs/libbz2/README +++ b/contrib/libs/libbz2/README @@ -1,196 +1,196 @@ - -This is the README for bzip2/libzip2. -This version is fully compatible with the previous public releases. - ------------------------------------------------------------------- -This file is part of bzip2/libbzip2, a program and library for -lossless, block-sorting data compression. - + +This is the README for bzip2/libzip2. +This version is fully compatible with the previous public releases. + +------------------------------------------------------------------ +This file is part of bzip2/libbzip2, a program and library for +lossless, block-sorting data compression. + bzip2/libbzip2 version 1.0.8 of 13 July 2019 Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - -Please read the WARNING, DISCLAIMER and PATENTS sections in this file. - -This program is released under the terms of the license contained -in the file LICENSE. ------------------------------------------------------------------- - -Complete documentation is available in Postscript form (manual.ps), -PDF (manual.pdf) or html (manual.html). A plain-text version of the -manual page is available as bzip2.txt. - - -HOW TO BUILD -- UNIX - -Type 'make'. This builds the library libbz2.a and then the programs -bzip2 and bzip2recover. Six self-tests are run. If the self-tests -complete ok, carry on to installation: - -To install in /usr/local/bin, /usr/local/lib, /usr/local/man and -/usr/local/include, type - - make install - -To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type - - make install PREFIX=/xxx/yyy - -If you are (justifiably) paranoid and want to see what 'make install' -is going to do, you can first do - - make -n install or - make -n install PREFIX=/xxx/yyy respectively. - -The -n instructs make to show the commands it would execute, but not -actually execute them. - - -HOW TO BUILD -- UNIX, shared library libbz2.so. - -Do 'make -f Makefile-libbz2_so'. This Makefile seems to work for -Linux-ELF (RedHat 7.2 on an x86 box), with gcc. I make no claims -that it works for any other platform, though I suspect it probably -will work for most platforms employing both ELF and gcc. - -bzip2-shared, a client of the shared library, is also built, but not -self-tested. So I suggest you also build using the normal Makefile, -since that conducts a self-test. A second reason to prefer the -version statically linked to the library is that, on x86 platforms, -building shared objects makes a valuable register (%ebx) unavailable -to gcc, resulting in a slowdown of 10%-20%, at least for bzip2. - -Important note for people upgrading .so's from 0.9.0/0.9.5 to version -1.0.X. All the functions in the library have been renamed, from (eg) -bzCompress to BZ2_bzCompress, to avoid namespace pollution. -Unfortunately this means that the libbz2.so created by -Makefile-libbz2_so will not work with any program which used an older -version of the library. I do encourage library clients to make the -effort to upgrade to use version 1.0, since it is both faster and more -robust than previous versions. - - -HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. - -It's difficult for me to support compilation on all these platforms. -My approach is to collect binaries for these platforms, and put them + +Please read the WARNING, DISCLAIMER and PATENTS sections in this file. + +This program is released under the terms of the license contained +in the file LICENSE. +------------------------------------------------------------------ + +Complete documentation is available in Postscript form (manual.ps), +PDF (manual.pdf) or html (manual.html). A plain-text version of the +manual page is available as bzip2.txt. + + +HOW TO BUILD -- UNIX + +Type 'make'. This builds the library libbz2.a and then the programs +bzip2 and bzip2recover. Six self-tests are run. If the self-tests +complete ok, carry on to installation: + +To install in /usr/local/bin, /usr/local/lib, /usr/local/man and +/usr/local/include, type + + make install + +To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type + + make install PREFIX=/xxx/yyy + +If you are (justifiably) paranoid and want to see what 'make install' +is going to do, you can first do + + make -n install or + make -n install PREFIX=/xxx/yyy respectively. + +The -n instructs make to show the commands it would execute, but not +actually execute them. + + +HOW TO BUILD -- UNIX, shared library libbz2.so. + +Do 'make -f Makefile-libbz2_so'. This Makefile seems to work for +Linux-ELF (RedHat 7.2 on an x86 box), with gcc. I make no claims +that it works for any other platform, though I suspect it probably +will work for most platforms employing both ELF and gcc. + +bzip2-shared, a client of the shared library, is also built, but not +self-tested. So I suggest you also build using the normal Makefile, +since that conducts a self-test. A second reason to prefer the +version statically linked to the library is that, on x86 platforms, +building shared objects makes a valuable register (%ebx) unavailable +to gcc, resulting in a slowdown of 10%-20%, at least for bzip2. + +Important note for people upgrading .so's from 0.9.0/0.9.5 to version +1.0.X. All the functions in the library have been renamed, from (eg) +bzCompress to BZ2_bzCompress, to avoid namespace pollution. +Unfortunately this means that the libbz2.so created by +Makefile-libbz2_so will not work with any program which used an older +version of the library. I do encourage library clients to make the +effort to upgrade to use version 1.0, since it is both faster and more +robust than previous versions. + + +HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. + +It's difficult for me to support compilation on all these platforms. +My approach is to collect binaries for these platforms, and put them on the master web site (https://sourceware.org/bzip2/). Look there. However -(FWIW), bzip2-1.0.X is very standard ANSI C and should compile -unmodified with MS Visual C. If you have difficulties building, you -might want to read README.COMPILATION.PROBLEMS. - -At least using MS Visual C++ 6, you can build from the unmodified -sources by issuing, in a command shell: - - nmake -f makefile.msc - -(you may need to first run the MSVC-provided script VCVARS32.BAT - so as to set up paths to the MSVC tools correctly). - - -VALIDATION - -Correct operation, in the sense that a compressed file can always be -decompressed to reproduce the original, is obviously of paramount -importance. To validate bzip2, I used a modified version of Mark -Nelson's churn program. Churn is an automated test driver which -recursively traverses a directory structure, using bzip2 to compress -and then decompress each file it encounters, and checking that the -decompressed data is the same as the original. - - - -Please read and be aware of the following: - -WARNING: - - This program and library (attempts to) compress data by - performing several non-trivial transformations on it. - Unless you are 100% familiar with *all* the algorithms - contained herein, and with the consequences of modifying them, - you should NOT meddle with the compression or decompression - machinery. Incorrect changes can and very likely *will* - lead to disastrous loss of data. - - -DISCLAIMER: - - I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE - USE OF THIS PROGRAM/LIBRARY, HOWSOEVER CAUSED. - - Every compression of a file implies an assumption that the - compressed file can be decompressed to reproduce the original. - Great efforts in design, coding and testing have been made to - ensure that this program works correctly. However, the complexity - of the algorithms, and, in particular, the presence of various - special cases in the code which occur with very low but non-zero - probability make it impossible to rule out the possibility of bugs - remaining in the program. DO NOT COMPRESS ANY DATA WITH THIS - PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER - SMALL, THAT THE DATA WILL NOT BE RECOVERABLE. - - That is not to say this program is inherently unreliable. - Indeed, I very much hope the opposite is true. bzip2/libbzip2 - has been carefully constructed and extensively tested. - - -PATENTS: - - To the best of my knowledge, bzip2/libbzip2 does not use any - patented algorithms. However, I do not have the resources - to carry out a patent search. Therefore I cannot give any - guarantee of the above statement. - - - -WHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ? - - * Approx 10% faster compression, 30% faster decompression - * -t (test mode) is a lot quicker - * Can decompress concatenated compressed files - * Programming interface, so programs can directly read/write .bz2 files - * Less restrictive (BSD-style) licensing - * Flag handling more compatible with GNU gzip - * Much more documentation, i.e., a proper user manual - * Hopefully, improved portability (at least of the library) - -WHAT'S NEW IN 0.9.5 ? - - * Compression speed is much less sensitive to the input - data than in previous versions. Specifically, the very - slow performance caused by repetitive data is fixed. - * Many small improvements in file and flag handling. - * A Y2K statement. - +(FWIW), bzip2-1.0.X is very standard ANSI C and should compile +unmodified with MS Visual C. If you have difficulties building, you +might want to read README.COMPILATION.PROBLEMS. + +At least using MS Visual C++ 6, you can build from the unmodified +sources by issuing, in a command shell: + + nmake -f makefile.msc + +(you may need to first run the MSVC-provided script VCVARS32.BAT + so as to set up paths to the MSVC tools correctly). + + +VALIDATION + +Correct operation, in the sense that a compressed file can always be +decompressed to reproduce the original, is obviously of paramount +importance. To validate bzip2, I used a modified version of Mark +Nelson's churn program. Churn is an automated test driver which +recursively traverses a directory structure, using bzip2 to compress +and then decompress each file it encounters, and checking that the +decompressed data is the same as the original. + + + +Please read and be aware of the following: + +WARNING: + + This program and library (attempts to) compress data by + performing several non-trivial transformations on it. + Unless you are 100% familiar with *all* the algorithms + contained herein, and with the consequences of modifying them, + you should NOT meddle with the compression or decompression + machinery. Incorrect changes can and very likely *will* + lead to disastrous loss of data. + + +DISCLAIMER: + + I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE + USE OF THIS PROGRAM/LIBRARY, HOWSOEVER CAUSED. + + Every compression of a file implies an assumption that the + compressed file can be decompressed to reproduce the original. + Great efforts in design, coding and testing have been made to + ensure that this program works correctly. However, the complexity + of the algorithms, and, in particular, the presence of various + special cases in the code which occur with very low but non-zero + probability make it impossible to rule out the possibility of bugs + remaining in the program. DO NOT COMPRESS ANY DATA WITH THIS + PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER + SMALL, THAT THE DATA WILL NOT BE RECOVERABLE. + + That is not to say this program is inherently unreliable. + Indeed, I very much hope the opposite is true. bzip2/libbzip2 + has been carefully constructed and extensively tested. + + +PATENTS: + + To the best of my knowledge, bzip2/libbzip2 does not use any + patented algorithms. However, I do not have the resources + to carry out a patent search. Therefore I cannot give any + guarantee of the above statement. + + + +WHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ? + + * Approx 10% faster compression, 30% faster decompression + * -t (test mode) is a lot quicker + * Can decompress concatenated compressed files + * Programming interface, so programs can directly read/write .bz2 files + * Less restrictive (BSD-style) licensing + * Flag handling more compatible with GNU gzip + * Much more documentation, i.e., a proper user manual + * Hopefully, improved portability (at least of the library) + +WHAT'S NEW IN 0.9.5 ? + + * Compression speed is much less sensitive to the input + data than in previous versions. Specifically, the very + slow performance caused by repetitive data is fixed. + * Many small improvements in file and flag handling. + * A Y2K statement. + WHAT'S NEW IN 1.0.x ? - - See the CHANGES file. - + + See the CHANGES file. + I hope you find bzip2 useful. Feel free to contact the developers at bzip2-devel@sourceware.org -if you have any suggestions or queries. Many people mailed me with -comments, suggestions and patches after the releases of bzip-0.15, -bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, -1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this -feedback. I thank you for your comments. - +if you have any suggestions or queries. Many people mailed me with +comments, suggestions and patches after the releases of bzip-0.15, +bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, +1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this +feedback. I thank you for your comments. + bzip2's "home" is https://sourceware.org/bzip2/ - -Julian Seward + +Julian Seward jseward@acm.org -Cambridge, UK. - -18 July 1996 (version 0.15) -25 August 1996 (version 0.21) - 7 August 1997 (bzip2, version 0.1) -29 August 1997 (bzip2, version 0.1pl2) -23 August 1998 (bzip2, version 0.9.0) - 8 June 1999 (bzip2, version 0.9.5) - 4 Sept 1999 (bzip2, version 0.9.5d) - 5 May 2000 (bzip2, version 1.0pre8) -30 December 2001 (bzip2, version 1.0.2pre1) -15 February 2005 (bzip2, version 1.0.3) -20 December 2006 (bzip2, version 1.0.4) -10 December 2007 (bzip2, version 1.0.5) - 6 Sept 2010 (bzip2, version 1.0.6) +Cambridge, UK. + +18 July 1996 (version 0.15) +25 August 1996 (version 0.21) + 7 August 1997 (bzip2, version 0.1) +29 August 1997 (bzip2, version 0.1pl2) +23 August 1998 (bzip2, version 0.9.0) + 8 June 1999 (bzip2, version 0.9.5) + 4 Sept 1999 (bzip2, version 0.9.5d) + 5 May 2000 (bzip2, version 1.0pre8) +30 December 2001 (bzip2, version 1.0.2pre1) +15 February 2005 (bzip2, version 1.0.3) +20 December 2006 (bzip2, version 1.0.4) +10 December 2007 (bzip2, version 1.0.5) + 6 Sept 2010 (bzip2, version 1.0.6) 27 June 2019 (bzip2, version 1.0.7) 13 July 2019 (bzip2, version 1.0.8) diff --git a/contrib/libs/libbz2/README.XML.STUFF b/contrib/libs/libbz2/README.XML.STUFF index cca2aff67f..1503476ebe 100644 --- a/contrib/libs/libbz2/README.XML.STUFF +++ b/contrib/libs/libbz2/README.XML.STUFF @@ -1,45 +1,45 @@ - ---------------------------------------------------------------- - This file is part of bzip2/libbzip2, a program and library for - lossless, block-sorting data compression. - + ---------------------------------------------------------------- + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + bzip2/libbzip2 version 1.0.8 of 13 July 2019 Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - - Please read the WARNING, DISCLAIMER and PATENTS sections in the - README file. - - This program is released under the terms of the license contained - in the file LICENSE. - ---------------------------------------------------------------- - -The script xmlproc.sh takes an xml file as input, -and processes it to create .pdf, .html or .ps output. -It uses format.pl, a perl script to format <pre> blocks nicely, - and add CDATA tags so writers do not have to use eg. < - -The file "entities.xml" must be edited to reflect current -version, year, etc. - - -Usage: - - ./xmlproc.sh -v manual.xml - Validates an xml file to ensure no dtd-compliance errors - - ./xmlproc.sh -html manual.xml - Output: manual.html - - ./xmlproc.sh -pdf manual.xml - Output: manual.pdf - - ./xmlproc.sh -ps manual.xml - Output: manual.ps - - -Notum bene: -- pdfxmltex barfs if given a filename with an underscore in it - -- xmltex won't work yet - there's a bug in passivetex - which we are all waiting for Sebastian to fix. - So we are going the xml -> pdf -> ps route for the time being, - using pdfxmltex. + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ---------------------------------------------------------------- + +The script xmlproc.sh takes an xml file as input, +and processes it to create .pdf, .html or .ps output. +It uses format.pl, a perl script to format <pre> blocks nicely, + and add CDATA tags so writers do not have to use eg. < + +The file "entities.xml" must be edited to reflect current +version, year, etc. + + +Usage: + + ./xmlproc.sh -v manual.xml + Validates an xml file to ensure no dtd-compliance errors + + ./xmlproc.sh -html manual.xml + Output: manual.html + + ./xmlproc.sh -pdf manual.xml + Output: manual.pdf + + ./xmlproc.sh -ps manual.xml + Output: manual.ps + + +Notum bene: +- pdfxmltex barfs if given a filename with an underscore in it + +- xmltex won't work yet - there's a bug in passivetex + which we are all waiting for Sebastian to fix. + So we are going the xml -> pdf -> ps route for the time being, + using pdfxmltex. diff --git a/contrib/libs/libbz2/bzlib.h b/contrib/libs/libbz2/bzlib.h index b7140abacf..a7d2cd6188 100644 --- a/contrib/libs/libbz2/bzlib.h +++ b/contrib/libs/libbz2/bzlib.h @@ -1,4 +1,4 @@ - + /*-------------------------------------------------------------*/ /*--- Public header file for the library. ---*/ /*--- bzlib.h ---*/ @@ -11,7 +11,7 @@ bzip2/libbzip2 version 1.0.8 of 13 July 2019 Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - Please read the WARNING, DISCLAIMER and PATENTS sections in the + Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. This program is released under the terms of the license contained @@ -45,7 +45,7 @@ extern "C" { #define BZ_OUTBUFF_FULL (-8) #define BZ_CONFIG_ERROR (-9) -typedef +typedef struct { char *next_in; unsigned int avail_in; @@ -62,7 +62,7 @@ typedef void *(*bzalloc)(void *,int,int); void (*bzfree)(void *,void *); void *opaque; - } + } bz_stream; @@ -88,34 +88,34 @@ typedef /*-- Core (low-level) library functions --*/ -BZ_EXTERN int BZ_API(BZ2_bzCompressInit) ( - bz_stream* strm, - int blockSize100k, - int verbosity, - int workFactor +BZ_EXTERN int BZ_API(BZ2_bzCompressInit) ( + bz_stream* strm, + int blockSize100k, + int verbosity, + int workFactor ); -BZ_EXTERN int BZ_API(BZ2_bzCompress) ( - bz_stream* strm, - int action +BZ_EXTERN int BZ_API(BZ2_bzCompress) ( + bz_stream* strm, + int action ); -BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) ( - bz_stream* strm +BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) ( + bz_stream* strm ); -BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) ( - bz_stream *strm, - int verbosity, +BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) ( + bz_stream *strm, + int verbosity, int small ); -BZ_EXTERN int BZ_API(BZ2_bzDecompress) ( - bz_stream* strm +BZ_EXTERN int BZ_API(BZ2_bzDecompress) ( + bz_stream* strm ); -BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) ( - bz_stream *strm +BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) ( + bz_stream *strm ); @@ -127,64 +127,64 @@ BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) ( typedef void BZFILE; -BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) ( - int* bzerror, - FILE* f, - int verbosity, +BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) ( + int* bzerror, + FILE* f, + int verbosity, int small, - void* unused, - int nUnused + void* unused, + int nUnused ); -BZ_EXTERN void BZ_API(BZ2_bzReadClose) ( - int* bzerror, - BZFILE* b +BZ_EXTERN void BZ_API(BZ2_bzReadClose) ( + int* bzerror, + BZFILE* b ); -BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) ( - int* bzerror, - BZFILE* b, - void** unused, - int* nUnused +BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) ( + int* bzerror, + BZFILE* b, + void** unused, + int* nUnused ); -BZ_EXTERN int BZ_API(BZ2_bzRead) ( - int* bzerror, - BZFILE* b, - void* buf, - int len +BZ_EXTERN int BZ_API(BZ2_bzRead) ( + int* bzerror, + BZFILE* b, + void* buf, + int len ); -BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) ( - int* bzerror, - FILE* f, - int blockSize100k, - int verbosity, - int workFactor +BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) ( + int* bzerror, + FILE* f, + int blockSize100k, + int verbosity, + int workFactor ); -BZ_EXTERN void BZ_API(BZ2_bzWrite) ( - int* bzerror, - BZFILE* b, - void* buf, - int len +BZ_EXTERN void BZ_API(BZ2_bzWrite) ( + int* bzerror, + BZFILE* b, + void* buf, + int len ); -BZ_EXTERN void BZ_API(BZ2_bzWriteClose) ( - int* bzerror, - BZFILE* b, - int abandon, - unsigned int* nbytes_in, - unsigned int* nbytes_out +BZ_EXTERN void BZ_API(BZ2_bzWriteClose) ( + int* bzerror, + BZFILE* b, + int abandon, + unsigned int* nbytes_in, + unsigned int* nbytes_out ); -BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) ( - int* bzerror, - BZFILE* b, - int abandon, - unsigned int* nbytes_in_lo32, - unsigned int* nbytes_in_hi32, - unsigned int* nbytes_out_lo32, +BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) ( + int* bzerror, + BZFILE* b, + int abandon, + unsigned int* nbytes_in_lo32, + unsigned int* nbytes_in_hi32, + unsigned int* nbytes_out_lo32, unsigned int* nbytes_out_hi32 ); #endif @@ -192,23 +192,23 @@ BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) ( /*-- Utility functions --*/ -BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) ( - char* dest, +BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) ( + char* dest, unsigned int* destLen, - char* source, + char* source, unsigned int sourceLen, - int blockSize100k, - int verbosity, - int workFactor + int blockSize100k, + int verbosity, + int workFactor ); -BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) ( - char* dest, +BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) ( + char* dest, unsigned int* destLen, - char* source, + char* source, unsigned int sourceLen, - int small, - int verbosity + int small, + int verbosity ); @@ -235,17 +235,17 @@ BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) ( int fd, const char *mode ); - + BZ_EXTERN int BZ_API(BZ2_bzread) ( - BZFILE* b, - void* buf, - int len + BZFILE* b, + void* buf, + int len ); BZ_EXTERN int BZ_API(BZ2_bzwrite) ( - BZFILE* b, - void* buf, - int len + BZFILE* b, + void* buf, + int len ); BZ_EXTERN int BZ_API(BZ2_bzflush) ( @@ -257,7 +257,7 @@ BZ_EXTERN void BZ_API(BZ2_bzclose) ( ); BZ_EXTERN const char * BZ_API(BZ2_bzerror) ( - BZFILE *b, + BZFILE *b, int *errnum ); #endif diff --git a/contrib/libs/libbz2/bzlib_private.h b/contrib/libs/libbz2/bzlib_private.h index 5bb6a727bc..2578c2dcf2 100644 --- a/contrib/libs/libbz2/bzlib_private.h +++ b/contrib/libs/libbz2/bzlib_private.h @@ -1,4 +1,4 @@ - + /*-------------------------------------------------------------*/ /*--- Private header file for the library. ---*/ /*--- bzlib_private.h ---*/ @@ -11,7 +11,7 @@ bzip2/libbzip2 version 1.0.8 of 13 July 2019 Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - Please read the WARNING, DISCLAIMER and PATENTS sections in the + Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. This program is released under the terms of the license contained @@ -51,7 +51,7 @@ typedef unsigned short UInt16; #ifndef __GNUC__ #define __inline__ /* */ -#endif +#endif #ifndef BZ_NO_STDIO @@ -109,7 +109,7 @@ extern void bz_internal_error ( int errcode ); #define BZ_HDR_Z 0x5a /* 'Z' */ #define BZ_HDR_h 0x68 /* 'h' */ #define BZ_HDR_0 0x30 /* '0' */ - + /*-- Constants for the back end. --*/ #define BZ_MAX_ALPHA_SIZE 258 @@ -269,19 +269,19 @@ typedef /*-- externs for compression. --*/ -extern void +extern void BZ2_blockSort ( EState* ); -extern void +extern void BZ2_compressBlock ( EState*, Bool ); -extern void +extern void BZ2_bsInitWrite ( EState* ); -extern void +extern void BZ2_hbAssignCodes ( Int32*, UChar*, Int32, Int32, Int32 ); -extern void +extern void BZ2_hbMakeCodeLengths ( UChar*, Int32*, Int32, Int32 ); @@ -425,7 +425,7 @@ typedef Int32 save_N; Int32 save_curr; Int32 save_zt; - Int32 save_zn; + Int32 save_zn; Int32 save_zvec; Int32 save_zj; Int32 save_gSel; @@ -481,13 +481,13 @@ typedef /*-- externs for decompression. --*/ -extern Int32 +extern Int32 BZ2_indexIntoF ( Int32, Int32* ); -extern Int32 +extern Int32 BZ2_decompress ( DState* ); -extern void +extern void BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, UChar*, Int32, Int32, Int32 ); diff --git a/contrib/libs/libbz2/compress.c b/contrib/libs/libbz2/compress.c index 89da383658..5dfa00231b 100644 --- a/contrib/libs/libbz2/compress.c +++ b/contrib/libs/libbz2/compress.c @@ -187,15 +187,15 @@ void generateMTFValues ( EState* s ) zPend = 0; } { - register UChar rtmp; - register UChar* ryy_j; - register UChar rll_i; + register UChar rtmp; + register UChar* ryy_j; + register UChar rll_i; rtmp = yy[1]; yy[1] = yy[0]; ryy_j = &(yy[1]); rll_i = ll_i; while ( rll_i != rtmp ) { - register UChar rtmp2; + register UChar rtmp2; ryy_j++; rtmp2 = rtmp; rtmp = *ryy_j; @@ -357,8 +357,8 @@ void sendMTFValues ( EState* s ) if (nGroups == 6 && 50 == ge-gs+1) { /*--- fast track the common case ---*/ - register UInt32 cost01, cost23, cost45; - register UInt16 icv; + register UInt32 cost01, cost23, cost45; + register UInt16 icv; cost01 = cost23 = cost45 = 0; # define BZ_ITER(nn) \ diff --git a/contrib/libs/libbz2/crctable.c b/contrib/libs/libbz2/crctable.c index 906f1b6326..a9212dbf2c 100644 --- a/contrib/libs/libbz2/crctable.c +++ b/contrib/libs/libbz2/crctable.c @@ -11,7 +11,7 @@ bzip2/libbzip2 version 1.0.8 of 13 July 2019 Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - Please read the WARNING, DISCLAIMER and PATENTS sections in the + Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. This program is released under the terms of the license contained diff --git a/contrib/libs/libbz2/decompress.c b/contrib/libs/libbz2/decompress.c index 881cd03add..a1a0bac892 100644 --- a/contrib/libs/libbz2/decompress.c +++ b/contrib/libs/libbz2/decompress.c @@ -387,13 +387,13 @@ Int32 BZ2_decompress ( DState* s ) es = -1; N = 1; do { - /* Check that N doesn't get too big, so that es doesn't - go negative. The maximum value that can be - RUNA/RUNB encoded is equal to the block size (post - the initial RLE), viz, 900k, so bounding N at 2 - million should guard against overflow without - rejecting any legitimate inputs. */ - if (N >= 2*1024*1024) RETURN(BZ_DATA_ERROR); + /* Check that N doesn't get too big, so that es doesn't + go negative. The maximum value that can be + RUNA/RUNB encoded is equal to the block size (post + the initial RLE), viz, 900k, so bounding N at 2 + million should guard against overflow without + rejecting any legitimate inputs. */ + if (N >= 2*1024*1024) RETURN(BZ_DATA_ERROR); if (nextSym == BZ_RUNA) es = es + (0+1) * N; else if (nextSym == BZ_RUNB) es = es + (1+1) * N; N = N * 2; @@ -498,28 +498,28 @@ Int32 BZ2_decompress ( DState* s ) RETURN(BZ_DATA_ERROR); /*-- Set up cftab to facilitate generation of T^(-1) --*/ - /* Check: unzftab entries in range. */ - for (i = 0; i <= 255; i++) { - if (s->unzftab[i] < 0 || s->unzftab[i] > nblock) - RETURN(BZ_DATA_ERROR); - } - /* Actually generate cftab. */ + /* Check: unzftab entries in range. */ + for (i = 0; i <= 255; i++) { + if (s->unzftab[i] < 0 || s->unzftab[i] > nblock) + RETURN(BZ_DATA_ERROR); + } + /* Actually generate cftab. */ s->cftab[0] = 0; for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1]; for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1]; - /* Check: cftab entries in range. */ + /* Check: cftab entries in range. */ for (i = 0; i <= 256; i++) { if (s->cftab[i] < 0 || s->cftab[i] > nblock) { /* s->cftab[i] can legitimately be == nblock */ RETURN(BZ_DATA_ERROR); } } - /* Check: cftab entries non-descending. */ - for (i = 1; i <= 256; i++) { - if (s->cftab[i-1] > s->cftab[i]) { - RETURN(BZ_DATA_ERROR); - } - } + /* Check: cftab entries non-descending. */ + for (i = 1; i <= 256; i++) { + if (s->cftab[i-1] > s->cftab[i]) { + RETURN(BZ_DATA_ERROR); + } + } s->state_out_len = 0; s->state_out_ch = 0; diff --git a/contrib/libs/libbz2/randtable.c b/contrib/libs/libbz2/randtable.c index aaa710446f..43de39ff68 100644 --- a/contrib/libs/libbz2/randtable.c +++ b/contrib/libs/libbz2/randtable.c @@ -11,7 +11,7 @@ bzip2/libbzip2 version 1.0.8 of 13 July 2019 Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - Please read the WARNING, DISCLAIMER and PATENTS sections in the + Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. This program is released under the terms of the license contained @@ -24,57 +24,57 @@ /*---------------------------------------------*/ const Int32 BZ2_rNums[512] = { - 619, 720, 127, 481, 931, 816, 813, 233, 566, 247, - 985, 724, 205, 454, 863, 491, 741, 242, 949, 214, - 733, 859, 335, 708, 621, 574, 73, 654, 730, 472, - 419, 436, 278, 496, 867, 210, 399, 680, 480, 51, - 878, 465, 811, 169, 869, 675, 611, 697, 867, 561, - 862, 687, 507, 283, 482, 129, 807, 591, 733, 623, - 150, 238, 59, 379, 684, 877, 625, 169, 643, 105, - 170, 607, 520, 932, 727, 476, 693, 425, 174, 647, - 73, 122, 335, 530, 442, 853, 695, 249, 445, 515, - 909, 545, 703, 919, 874, 474, 882, 500, 594, 612, - 641, 801, 220, 162, 819, 984, 589, 513, 495, 799, - 161, 604, 958, 533, 221, 400, 386, 867, 600, 782, - 382, 596, 414, 171, 516, 375, 682, 485, 911, 276, - 98, 553, 163, 354, 666, 933, 424, 341, 533, 870, - 227, 730, 475, 186, 263, 647, 537, 686, 600, 224, - 469, 68, 770, 919, 190, 373, 294, 822, 808, 206, - 184, 943, 795, 384, 383, 461, 404, 758, 839, 887, - 715, 67, 618, 276, 204, 918, 873, 777, 604, 560, - 951, 160, 578, 722, 79, 804, 96, 409, 713, 940, - 652, 934, 970, 447, 318, 353, 859, 672, 112, 785, - 645, 863, 803, 350, 139, 93, 354, 99, 820, 908, - 609, 772, 154, 274, 580, 184, 79, 626, 630, 742, - 653, 282, 762, 623, 680, 81, 927, 626, 789, 125, - 411, 521, 938, 300, 821, 78, 343, 175, 128, 250, - 170, 774, 972, 275, 999, 639, 495, 78, 352, 126, - 857, 956, 358, 619, 580, 124, 737, 594, 701, 612, - 669, 112, 134, 694, 363, 992, 809, 743, 168, 974, - 944, 375, 748, 52, 600, 747, 642, 182, 862, 81, - 344, 805, 988, 739, 511, 655, 814, 334, 249, 515, - 897, 955, 664, 981, 649, 113, 974, 459, 893, 228, - 433, 837, 553, 268, 926, 240, 102, 654, 459, 51, - 686, 754, 806, 760, 493, 403, 415, 394, 687, 700, - 946, 670, 656, 610, 738, 392, 760, 799, 887, 653, - 978, 321, 576, 617, 626, 502, 894, 679, 243, 440, - 680, 879, 194, 572, 640, 724, 926, 56, 204, 700, - 707, 151, 457, 449, 797, 195, 791, 558, 945, 679, - 297, 59, 87, 824, 713, 663, 412, 693, 342, 606, - 134, 108, 571, 364, 631, 212, 174, 643, 304, 329, - 343, 97, 430, 751, 497, 314, 983, 374, 822, 928, - 140, 206, 73, 263, 980, 736, 876, 478, 430, 305, - 170, 514, 364, 692, 829, 82, 855, 953, 676, 246, - 369, 970, 294, 750, 807, 827, 150, 790, 288, 923, - 804, 378, 215, 828, 592, 281, 565, 555, 710, 82, - 896, 831, 547, 261, 524, 462, 293, 465, 502, 56, - 661, 821, 976, 991, 658, 869, 905, 758, 745, 193, - 768, 550, 608, 933, 378, 286, 215, 979, 792, 961, - 61, 688, 793, 644, 986, 403, 106, 366, 905, 644, - 372, 567, 466, 434, 645, 210, 389, 550, 919, 135, - 780, 773, 635, 389, 707, 100, 626, 958, 165, 504, - 920, 176, 193, 713, 857, 265, 203, 50, 668, 108, - 645, 990, 626, 197, 510, 357, 358, 850, 858, 364, + 619, 720, 127, 481, 931, 816, 813, 233, 566, 247, + 985, 724, 205, 454, 863, 491, 741, 242, 949, 214, + 733, 859, 335, 708, 621, 574, 73, 654, 730, 472, + 419, 436, 278, 496, 867, 210, 399, 680, 480, 51, + 878, 465, 811, 169, 869, 675, 611, 697, 867, 561, + 862, 687, 507, 283, 482, 129, 807, 591, 733, 623, + 150, 238, 59, 379, 684, 877, 625, 169, 643, 105, + 170, 607, 520, 932, 727, 476, 693, 425, 174, 647, + 73, 122, 335, 530, 442, 853, 695, 249, 445, 515, + 909, 545, 703, 919, 874, 474, 882, 500, 594, 612, + 641, 801, 220, 162, 819, 984, 589, 513, 495, 799, + 161, 604, 958, 533, 221, 400, 386, 867, 600, 782, + 382, 596, 414, 171, 516, 375, 682, 485, 911, 276, + 98, 553, 163, 354, 666, 933, 424, 341, 533, 870, + 227, 730, 475, 186, 263, 647, 537, 686, 600, 224, + 469, 68, 770, 919, 190, 373, 294, 822, 808, 206, + 184, 943, 795, 384, 383, 461, 404, 758, 839, 887, + 715, 67, 618, 276, 204, 918, 873, 777, 604, 560, + 951, 160, 578, 722, 79, 804, 96, 409, 713, 940, + 652, 934, 970, 447, 318, 353, 859, 672, 112, 785, + 645, 863, 803, 350, 139, 93, 354, 99, 820, 908, + 609, 772, 154, 274, 580, 184, 79, 626, 630, 742, + 653, 282, 762, 623, 680, 81, 927, 626, 789, 125, + 411, 521, 938, 300, 821, 78, 343, 175, 128, 250, + 170, 774, 972, 275, 999, 639, 495, 78, 352, 126, + 857, 956, 358, 619, 580, 124, 737, 594, 701, 612, + 669, 112, 134, 694, 363, 992, 809, 743, 168, 974, + 944, 375, 748, 52, 600, 747, 642, 182, 862, 81, + 344, 805, 988, 739, 511, 655, 814, 334, 249, 515, + 897, 955, 664, 981, 649, 113, 974, 459, 893, 228, + 433, 837, 553, 268, 926, 240, 102, 654, 459, 51, + 686, 754, 806, 760, 493, 403, 415, 394, 687, 700, + 946, 670, 656, 610, 738, 392, 760, 799, 887, 653, + 978, 321, 576, 617, 626, 502, 894, 679, 243, 440, + 680, 879, 194, 572, 640, 724, 926, 56, 204, 700, + 707, 151, 457, 449, 797, 195, 791, 558, 945, 679, + 297, 59, 87, 824, 713, 663, 412, 693, 342, 606, + 134, 108, 571, 364, 631, 212, 174, 643, 304, 329, + 343, 97, 430, 751, 497, 314, 983, 374, 822, 928, + 140, 206, 73, 263, 980, 736, 876, 478, 430, 305, + 170, 514, 364, 692, 829, 82, 855, 953, 676, 246, + 369, 970, 294, 750, 807, 827, 150, 790, 288, 923, + 804, 378, 215, 828, 592, 281, 565, 555, 710, 82, + 896, 831, 547, 261, 524, 462, 293, 465, 502, 56, + 661, 821, 976, 991, 658, 869, 905, 758, 745, 193, + 768, 550, 608, 933, 378, 286, 215, 979, 792, 961, + 61, 688, 793, 644, 986, 403, 106, 366, 905, 644, + 372, 567, 466, 434, 645, 210, 389, 550, 919, 135, + 780, 773, 635, 389, 707, 100, 626, 958, 165, 504, + 920, 176, 193, 713, 857, 265, 203, 50, 668, 108, + 645, 990, 626, 197, 510, 357, 358, 850, 858, 364, 936, 638 }; diff --git a/contrib/libs/libbz2/ya.make b/contrib/libs/libbz2/ya.make index de58e402f1..3d5be08322 100644 --- a/contrib/libs/libbz2/ya.make +++ b/contrib/libs/libbz2/ya.make @@ -1,5 +1,5 @@ -# Generated by devtools/yamaker from nixpkgs 5852a21819542e6809f68ba5a798600e69874e76. - +# Generated by devtools/yamaker from nixpkgs 5852a21819542e6809f68ba5a798600e69874e76. + LIBRARY() OWNER( @@ -8,32 +8,32 @@ OWNER( ) VERSION(1.0.8) - -ORIGINAL_SOURCE(https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz) - + +ORIGINAL_SOURCE(https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz) + LICENSE( BSD-3-Clause AND bzip2-1.0.6 ) - + LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -NO_COMPILER_WARNINGS() +NO_COMPILER_WARNINGS() -NO_RUNTIME() +NO_RUNTIME() IF (SANITIZER_TYPE == undefined) NO_SANITIZE() -ENDIF() +ENDIF() SRCS( - blocksort.c - bzlib.c - compress.c + blocksort.c + bzlib.c + compress.c crctable.c decompress.c huffman.c - randtable.c + randtable.c ) END() |