BizHawk/ExternalProjects/LibBizHash
CasualPokePlayer 32e8afcedc
Implement hardware accelerated CRC32 and SHA1, using them if possible (#3348)
* Implement hardware accelerated CRC32 and SHA1, use them if possible.
CRC32's generic function is also replaced with zlib's as it is much more performant than our implementation
Full hash of a ~731MB disc took only ~369 ms with this, and the generic CRC32 isn't so far behind at ~659 ms
SHA1 should perform 4x faster if the user's CPU supports the SHA instructions.

Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
Co-authored-by: Morilli <35152647+Morilli@users.noreply.github.com>
2022-08-09 23:30:17 -07:00
..
common Implement hardware accelerated CRC32 and SHA1, using them if possible (#3348) 2022-08-09 23:30:17 -07:00
crc32 Implement hardware accelerated CRC32 and SHA1, using them if possible (#3348) 2022-08-09 23:30:17 -07:00
sha1 Implement hardware accelerated CRC32 and SHA1, using them if possible (#3348) 2022-08-09 23:30:17 -07:00
Makefile Implement hardware accelerated CRC32 and SHA1, using them if possible (#3348) 2022-08-09 23:30:17 -07:00
README.md Implement hardware accelerated CRC32 and SHA1, using them if possible (#3348) 2022-08-09 23:30:17 -07:00
bizinterface.c Implement hardware accelerated CRC32 and SHA1, using them if possible (#3348) 2022-08-09 23:30:17 -07:00

README.md

LibBizHash is the unmanaged side for BizHawk's hashing.

CRC32 code is taken from zlib-ng with massive slashing of code and various tweaks. This code is licensed under the zlib license. SHA1 is code is taken from SHA-Intrinsics with some tweaks. This code is under the public domain.

To build, just do make in this directory. Note gcc 10 or later is required (due to missing intrinsics in older gcc versions)

zlib-ng's license:

(C) 1995-2013 Jean-loup Gailly and Mark Adler

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

    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.

    Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

    This notice may not be removed or altered from any source distribution.