faster crc32 by doing slicing-by-4

This commit is contained in:
Martins Mozeiko
2017-10-31 21:05:38 -07:00
parent da6bab7c4c
commit 4e223448de
6 changed files with 217 additions and 57 deletions
+11
View File
@@ -0,0 +1,11 @@
#pragma once
#include "pkg2zip_utils.h"
typedef struct {
MSVC_ALIGN(16) uint32_t crc GCC_ALIGN(16);
} crc32_ctx;
void crc32_init(crc32_ctx* ctx);
void crc32_update(crc32_ctx* ctx, const void* buffer, size_t size);
uint32_t crc32_done(crc32_ctx* ctx);