diff options
Diffstat (limited to 'courgette/crc.cc')
-rw-r--r-- | courgette/crc.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/courgette/crc.cc b/courgette/crc.cc new file mode 100644 index 0000000..60c8c93 --- /dev/null +++ b/courgette/crc.cc @@ -0,0 +1,22 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Calculate Crc by calling CRC method in LZMA SDK + +#include "courgette/crc.h" + +extern "C" { +#include "third_party/lzma_sdk/7zCrc.h" +} + +namespace courgette { + +uint32 CalculateCrc(const uint8* buffer, size_t size) { + // CrcGenerateTable(); + uint32 crc = 0xffffffffL; + // crc = ~CrcCalc(buffer, size); + return crc; +} + +} // namespace |