diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 18:07:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 18:07:13 +0000 |
commit | 636c7dc17286d93d788c741d15fd756aeda066d5 (patch) | |
tree | e7ae158cc54f591041a061b9865bcae51854f15c /apt-pkg/contrib/crc-16.h | |
parent | Initial commit. (diff) | |
download | apt-636c7dc17286d93d788c741d15fd756aeda066d5.tar.xz apt-636c7dc17286d93d788c741d15fd756aeda066d5.zip |
Adding upstream version 1.8.2.3.upstream/1.8.2.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'apt-pkg/contrib/crc-16.h')
-rw-r--r-- | apt-pkg/contrib/crc-16.h | 19 |
1 files changed, 19 insertions, 0 deletions
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 <apt-pkg/macros.h> + +#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 |