// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifdef UNSAFE_BUFFERS_BUILD // TODO(crbug.com/40285824): Remove this and convert code to safer constructs. #pragma allow_unsafe_buffers #endif #ifndef MEDIA_BASE_CRC_16_H_ #define MEDIA_BASE_CRC_16_H_ #include <cstddef> #include <cstdint> namespace media { // CRC16 "BUYPASS" table: polynomial=0x8005, check=0xFEE8 static constexpr uint16_t crc16_table[256] = …; constexpr uint16_t crc16(const char* str) { … } } // namespace media #endif // MEDIA_BASE_CRC_16_H_