summaryrefslogtreecommitdiff
path: root/crc32.c
diff options
context:
space:
mode:
authorHans Kristian Rosbach <hk-git@circlestorm.org>2019-09-17 14:12:15 +0200
committerHans Kristian Rosbach <hk-github@circlestorm.org>2019-09-20 22:29:21 +0200
commitbc29c36ea5b52416a796ce065e017c438c98f338 (patch)
tree088c93e9aa5df86f880b99f4057b03e71a74245c /crc32.c
parent1e424d9bbf492f4e2454fbc0c8a7aa58834136e9 (diff)
Add makecrct test and clean up makecrct.c code
Update crc32.h tables to match makecrct output.
Diffstat (limited to 'crc32.c')
-rw-r--r--crc32.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/crc32.c b/crc32.c
index b20221c..4959cea 100644
--- a/crc32.c
+++ b/crc32.c
@@ -16,27 +16,14 @@
#include <inttypes.h>
#include "deflate.h"
#include "functable.h"
+#include "crc32_p.h"
#include "crc32.h"
/* Local functions for crc concatenation */
-#define GF2_DIM 32 /* dimension of GF(2) vectors (length of CRC) */
-static uint32_t gf2_matrix_times(const uint32_t *mat, uint32_t vec);
static uint32_t crc32_combine_(uint32_t crc1, uint32_t crc2, z_off64_t len2);
static void crc32_combine_gen_(uint32_t *op, z_off64_t len2);
-/* ========================================================================= */
-static uint32_t gf2_matrix_times(const uint32_t *mat, uint32_t vec) {
- uint32_t sum = 0;
- while (vec) {
- if (vec & 1)
- sum ^= *mat;
- vec >>= 1;
- mat++;
- }
- return sum;
-}
-
/* =========================================================================
* This function can be used by asm versions of crc32()
*/