chromium/third_party/leveldatabase/src/util/crc32c.cc

// Copyright (c) 2011 The LevelDB 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.
//
// A portable implementation of crc32c.

#include "util/crc32c.h"

#include <cstddef>
#include <cstdint>

#include "port/port.h"
#include "util/coding.h"

namespace leveldb {
namespace crc32c {

namespace {

const uint32_t kByteExtensionTable[256] =;

const uint32_t kStrideExtensionTable0[256] =;

const uint32_t kStrideExtensionTable1[256] =;

const uint32_t kStrideExtensionTable2[256] =;

const uint32_t kStrideExtensionTable3[256] =;

// CRCs are pre- and post- conditioned by xoring with all ones.
static constexpr const uint32_t kCRC32Xor =;

// Reads a little-endian 32-bit integer from a 32-bit-aligned buffer.
inline uint32_t ReadUint32LE(const uint8_t* buffer) {}

// Returns the smallest address >= the given address that is aligned to N bytes.
//
// N must be a power of two.
template <int N>
constexpr inline const uint8_t* RoundUp(const uint8_t* pointer) {}

}  // namespace

// Determine if the CPU running this program can accelerate the CRC32C
// calculation.
static bool CanAccelerateCRC32C() {}

uint32_t Extend(uint32_t crc, const char* data, size_t n) {}

}  // namespace crc32c
}  // namespace leveldb