aboutsummaryrefslogtreecommitdiff
path: root/src/crc32c_internal.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-01-28 16:59:58 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-01-28 16:59:58 +0100
commit2e1819311a59fb5cb26e3ca50a510bfe01358350 (patch)
treef70e4b8e3585d605a4c473342b8bb0545aee1824 /src/crc32c_internal.h
Squashed 'src/crc32c/' content from commit 224988680f7673cd7c769963d4035cb315aa3388
git-subtree-dir: src/crc32c git-subtree-split: 224988680f7673cd7c769963d4035cb315aa3388
Diffstat (limited to 'src/crc32c_internal.h')
-rw-r--r--src/crc32c_internal.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/crc32c_internal.h b/src/crc32c_internal.h
new file mode 100644
index 0000000000..2bd23dea43
--- /dev/null
+++ b/src/crc32c_internal.h
@@ -0,0 +1,23 @@
+// Copyright 2017 The CRC32C Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file. See the AUTHORS file for names of contributors.
+
+#ifndef CRC32C_CRC32C_INTERNAL_H_
+#define CRC32C_CRC32C_INTERNAL_H_
+
+// Internal functions that may change between releases.
+
+#include <cstddef>
+#include <cstdint>
+
+namespace crc32c {
+
+// Un-accelerated implementation that works on all CPUs.
+uint32_t ExtendPortable(uint32_t crc, const uint8_t* data, size_t count);
+
+// CRCs are pre- and post- conditioned by xoring with all ones.
+static constexpr const uint32_t kCRC32Xor = static_cast<uint32_t>(0xffffffffU);
+
+} // namespace crc32c
+
+#endif // CRC32C_CRC32C_INTERNAL_H_