summaryrefslogtreecommitdiff
path: root/adler32.c
AgeCommit message (Collapse)Author
2020-08-31Rename ZEXPORT and ZEXTERN for consistency.Nathan Moinvaziri
2020-08-31Rename ZLIB_INTERNAL to Z_INTERNAL for consistency.Nathan Moinvaziri
2020-08-16Remove NO_DIVIDE from adler32.Nathan Moinvaziri
2020-08-02Fixed extra symbols added to ABI when zlib-compat specified.Nathan Moinvaziri
2020-08-02Style cleanup.Mika Lindqvist
* Remove space between function name and opening parenthesis * Remove space closing parenthesis of cast and variable name
2020-08-02Fix signature of adler32(), adler32_combine(), adler32_combine64() and ↵Mika Lindqvist
adler32_z() in compat mode. * See #700
2020-06-25Move DO* macro definitions to adler32_p.hMatheus Castanho
Add new generic definitions of DO* macros used by adler32 algorithms to adler32_p.h to allow reuse by other adler32 implementations.
2020-06-08Add UNLIKELY to first 3 branches in adler32 variants.Nathan Moinvaziri
2020-06-08For gzseek, gzoffset, gzopen, adler32_combine, crc32_combine and ↵Nathan Moinvaziri
crc32_combine_gen, export 32-bit and 64-bit versions for zlib-compatible api and only 64-bit version (without 64 suffix) for zlib-ng native api.
2020-03-17Remove cvs keywordsPavel P
2019-04-04cleanup arm/adler32_neon.c codeSebastian Pop
2019-04-04only call NEON adler32 for more than 16 bytesSebastian Pop
improves performance of inflate by up to 6% on an A-73 Hikey running at 2.36 GHz when executing the chromium benchmark on the snappy data set. In a few cases inflate is slower by up to 0.8%. Overall performance of inflate is better by about 0.3%.
2019-01-21Replace the UNROLL_LESS define with UNROLL_MORE, making UNROLL_LESS the default.Hans Kristian Rosbach
Performance benchmarks have so far not shown that any platform benefits from UNROLL_MORE, although this might be beneficial on older compilers/cpus or for compiling without optimizations. The extra UNROLL_MORE code should be considered for removal since it is never enabled by us and will likely only serve to confuse and contribute to bitrot.
2018-09-20fix #187: remove errors exposed by undefined behavior sanitizerSebastian Pop
Move decrement in loop to avoid the following errors: adler32.c:91:19: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long') adler32.c:136:19: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long') inflate.c:972:32: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned int' Fix the following bugs as recommended by Mika Lindqvist: arch/x86/deflate_quick.c:233:22: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned int' arch/x86/fill_window_sse.c:52:28: runtime error: unsigned integer overflow: 1 - 8192 cannot be represented in type 'unsigned int'
2018-03-22Move private defines from zconf.h and zconf-ng.h to zbuild.hMika Lindqvist
* move definition of z_size_t to zbuild.h
2018-01-31Add function prefix (zng_) to all exported functions to allow zlib-ngHans Kristian Rosbach
to co-exist in an application that has been linked to something that depends on stock zlib. Previously, that would cause random problems since there is no way to guarantee what zlib version is being used for each dynamically linked function. Add the corresponding zlib-ng.h. Tests, example and minigzip will not compile before they have been adapted to use the correct functions as well. Either duplicate them, so we have minigzip-ng.c for example, or add compile-time detection in the source code.
2017-05-03Lazily initialize functable members. (#108)Mika Lindqvist
- Split functableInit() function as separate functions for each functable member, so we don't need to initialize full functable in multiple places in the zlib-ng code, or to check for NULL on every invocation. - Optimized function for each functable member is detected on first invocation and the functable item is updated for subsequent invocations. - Remove NULL check in adler32() and adler32_z() as it is no longer needed.
2017-04-24- Add adler32 to functableHans Kristian Rosbach
- Add missing call to functableinit from inflateinit - Fix external direct calls to adler32 functions without calling functableinit
2017-04-24ARM optimizations part 2 (#107)Mika Lindqvist
* add adler32_neon to main dependency checking and ARM/Windows Makefile * split non-optimized adler32 to adler32_c so we can test/compare both without recompiling. * add detection of default floating point ABI in gcc NOTE: This should avoid build error when gcc supports both ABIs but header for just one ABI is installed.
2017-04-22Implementing NEON-ized Adler32 checksum (#102)Adenilson Cavalcanti
The checksum is calculated in the uncompressed PNG data and can be made much faster by using SIMD. Tests in ARMv8 yielded an improvement of about 3x (e.g. walltime was 350ms x 125ms for a 4096x4096 bytes executed 30 times). This yields an improvement in image decoding in Chromium around 18% (see https://bugs.chromium.org/p/chromium/issues/detail?id=688601).
2017-02-09zlib 1.2.9Mark Adler
2017-02-09Add crc32_z() and adler32_z() functions with size_t lengths.Mark Adler
2017-01-31Replace Z_NULL with NULL. Fix incorrect uses of NULL/Z_NULL.Mika Lindqvist
2015-12-14Type cleanup.Mika Lindqvist
2015-11-03Clean up portability for shifts and integer sizes.Mark Adler
2015-05-25Style cleanup for adler/crc codeHans Kristian Rosbach
2015-05-17Kill Byte and BytefDaniel Axtens
Signed-off-by: Daniel Axtens <dja@axtens.net> Conflicts: adler32.c compress.c deflate.c inflate.c match.c test/example.c uncompr.c zlib.h
2015-05-12Convert remaining K&R function declarations to ANSI-C declarations.Hans Kristian Rosbach
2015-05-12Minor cleanup of includefiles relating mostly to stdint.hHans Kristian Rosbach
2015-05-12Combine CRC32_UNROLL_LESS and ADLER32_UNROLL_LESS into UNROLL_LESSHans Kristian Rosbach
2015-05-11adler32: unsigned long -> uint32_tDaniel Axtens
Authored by Danial Axtens, with some minor merge fixups by Hans Kristian Rosbach. Conflicts: adler32.c zlib.h zutil.h
2015-05-11adler32: local -> staticDaniel Axtens
Signed-off-by: Daniel Axtens <dja@axtens.net> Conflicts: adler32.c
2014-10-18Rewrite K&R-style function prototypes to ANSI-C-style.hansr
Only internal functions, no exported functions in this commit.
2014-10-16Remove FAR variants of variables ushf, schf, Posf, Bytef, charf,hansr
intf, uIntf and uLongf
2014-10-12Remove workarounds for non-ANSI-C compatible compilers (Part 2)hansr
-Removing usage of OF() definition
2014-01-17Add preprocessor define to tune Adler32 loop unrolling.Jim Kukunas
Excessive loop unrolling is detrimental to performance. This patch adds a preprocessor define, ADLER32_UNROLL_LESS, to reduce unrolling factor from 16 to 8. Updates configure script to set as default on x86
2011-09-11zlib 1.2.5.1Mark Adler
2011-09-09zlib 1.2.3.4Mark Adler
2011-09-09zlib 1.2.3.3Mark Adler
2011-09-09zlib 1.2.2.2Mark Adler
2011-09-09zlib 1.2.2.1Mark Adler
2011-09-09zlib 1.2.1Mark Adler
2011-09-09zlib 1.2.0.8Mark Adler
2011-09-09zlib 1.2.0.5Mark Adler
2011-09-09zlib 1.2.0.2Mark Adler
2011-09-09zlib 1.2.0.1Mark Adler
2011-09-09zlib 1.2.0Mark Adler
2011-09-09zlib 1.1.4Mark Adler
2011-09-09zlib 1.0.9Mark Adler
2011-09-09zlib 1.0.7Mark Adler