xref: /aosp_15_r20/external/pytorch/caffe2/serialize/crc.cc (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #include "miniz.h"
2 #include <iostream>
3 
4 #include "caffe2/serialize/crc_alt.h"
5 
6 extern "C" {
7 // See: miniz.h
8 #if defined(USE_EXTERNAL_MZCRC)
mz_crc32(mz_ulong crc,const mz_uint8 * ptr,size_t buf_len)9 mz_ulong mz_crc32(mz_ulong crc, const mz_uint8* ptr, size_t buf_len) {
10   auto z = crc32_fast(ptr, buf_len, crc);
11   return z;
12 };
13 #endif
14 }
15