xref: /aosp_15_r20/external/webrtc/third_party/crc32c/src/src/crc32c_internal.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 // Copyright 2017 The CRC32C Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. See the AUTHORS file for names of contributors.
4 
5 #ifndef CRC32C_CRC32C_INTERNAL_H_
6 #define CRC32C_CRC32C_INTERNAL_H_
7 
8 // Internal functions that may change between releases.
9 
10 #include <cstddef>
11 #include <cstdint>
12 
13 namespace crc32c {
14 
15 // Un-accelerated implementation that works on all CPUs.
16 uint32_t ExtendPortable(uint32_t crc, const uint8_t* data, size_t count);
17 
18 // CRCs are pre- and post- conditioned by xoring with all ones.
19 static constexpr const uint32_t kCRC32Xor = static_cast<uint32_t>(0xffffffffU);
20 
21 }  // namespace crc32c
22 
23 #endif  // CRC32C_CRC32C_INTERNAL_H_
24