include/mgba-util/crc32.h (view raw)
1/* Copyright (c) 2013-2014 Jeffrey Pfau
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6#ifndef CRC32_H
7#define CRC32_H
8
9#include <mgba-util/common.h>
10
11CXX_GUARD_START
12
13struct VFile;
14
15#ifndef HAVE_CRC32
16uint32_t crc32(uint32_t crc, const void* buf, size_t size);
17#else
18#include <zlib.h>
19#endif
20
21uint32_t doCrc32(const void* buf, size_t size);
22uint32_t fileCrc32(struct VFile* file, size_t endOffset);
23
24CXX_GUARD_END
25
26#endif