cpython: 5ae6102270df (original) (raw)
Mercurial > cpython
changeset 105805:5ae6102270df 2.7
Issue #29004: Document binascii.crc_hqx() implements CRC-CCITT [#29004]
Martin Panter vadmium+py@gmail.com | |
---|---|
date | Sat, 24 Dec 2016 07:53:57 +0000 |
parents | d1c16588644f |
children | d63a11bd98ce |
files | Doc/library/binascii.rst Modules/binascii.c |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-)[+] [-] Doc/library/binascii.rst 6 Modules/binascii.c 2 |
line wrap: on
line diff
--- a/Doc/library/binascii.rst
+++ b/Doc/library/binascii.rst
@@ -101,8 +101,10 @@ The :mod:binascii
module defines the f
.. function:: crc_hqx(data, crc)
- Compute a 16-bit CRC value of data, starting with an initial crc and
- returning the result. This uses the CRC-CCITT polynomial
- x:sup:
16
+ x:sup:12
+ x:sup:5
+ 1, often represented as - 0x1021. This CRC is used in the binhex4 format.
.. function:: crc32(data[, crc])
--- a/Modules/binascii.c +++ b/Modules/binascii.c @@ -842,7 +842,7 @@ binascii_rledecode_hqx(PyObject *self, P } PyDoc_STRVAR(doc_crc_hqx, -"(data, oldcrc) -> newcrc. Compute hqx CRC incrementally"); +"(data, oldcrc) -> newcrc. Compute CRC-CCITT incrementally"); static PyObject * binascii_crc_hqx(PyObject *self, PyObject *args)