From 636c7dc17286d93d788c741d15fd756aeda066d5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 5 May 2024 20:07:13 +0200 Subject: Adding upstream version 1.8.2.3. Signed-off-by: Daniel Baumann --- apt-pkg/contrib/crc-16.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 apt-pkg/contrib/crc-16.h (limited to 'apt-pkg/contrib/crc-16.h') diff --git a/apt-pkg/contrib/crc-16.h b/apt-pkg/contrib/crc-16.h new file mode 100644 index 0000000..3e07560 --- /dev/null +++ b/apt-pkg/contrib/crc-16.h @@ -0,0 +1,19 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +/* ###################################################################### + + CRC16 - Compute a 16bit crc very quickly + + ##################################################################### */ + /*}}}*/ +#ifndef APTPKG_CRC16_H +#define APTPKG_CRC16_H + +#include + +#define INIT_FCS 0xffff +unsigned short AddCRC16Byte(unsigned short fcs, unsigned char byte) APT_PURE; +unsigned short AddCRC16(unsigned short fcs, void const *buf, + unsigned long long len) APT_PURE; + +#endif -- cgit v1.2.3