From ce6717a9f852fda9d2441eea5f13b3ab4f826af0 Mon Sep 17 00:00:00 2001 From: fkm3 Date: Thu, 9 Feb 2017 07:09:55 -0800 Subject: [PATCH] Use the CRC32C implementation in snappy-framing. --- tensorflow-records/src/TensorFlow/CRC32C.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tensorflow-records/src/TensorFlow/CRC32C.hs b/tensorflow-records/src/TensorFlow/CRC32C.hs index eaa2dfa..b6c3e7f 100644 --- a/tensorflow-records/src/TensorFlow/CRC32C.hs +++ b/tensorflow-records/src/TensorFlow/CRC32C.hs @@ -23,13 +23,14 @@ module TensorFlow.CRC32C import Data.Bits (rotateL, rotateR) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL +import Data.Digest.CRC32C (crc32c_update) import Data.List (foldl') import Data.Word (Word32) -- | Compute the CRC32C checksum of the concatenation of the bytes checksummed -- by the given CRC32C value and the bytes in the given ByteString. extend :: Word32 -> B.ByteString -> Word32 -extend = _crcExtend +extend = crc32c_update -- | Compute the CRC32C checksum of the given bytes. value :: BL.ByteString -> Word32