[issue29004] binascii.crc_hqx() implements CRC-CCITT

2016-12-24 Thread Martin Panter
Martin Panter added the comment: Thanks for the help Serhiy -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29004] binascii.crc_hqx() implements CRC-CCITT

2016-12-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset a33472f8a2c6 by Martin Panter in branch '3.5': Issue #29004: Document binascii.crc_hqx() implements CRC-CCITT https://hg.python.org/cpython/rev/a33472f8a2c6 New changeset 52db2072e88b by Martin Panter in branch '3.6': Issue #29004: Merge crc_hqx()

[issue29004] binascii.crc_hqx() implements CRC-CCITT

2016-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Okay, then the patch LGTM. Use the form of the polynomial that you prefer. -- ___ Python tracker ___

[issue29004] binascii.crc_hqx() implements CRC-CCITT

2016-12-18 Thread Martin Panter
Martin Panter added the comment: It seems I can write it without the escaped spaces. Is there a problem with this: *x*:sup:`16` + *x*:sup:`12` + *x*:sup:`5` + 1 I’m happy to add the CRC-32 polynomial if you think it would be useful, although it is a lot longer (fifteen terms instead of

[issue29004] binascii.crc_hqx() implements CRC-CCITT

2016-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If document the polynomial for crc_hqx, maybe document it for crc32 and adler32? Wouldn't be better to write the formula as *x*\ :sup:`16` + *x*\ :sup:`12 + *x*\ :sup:`5` + 1 ? -- nosy: +eric.smith, lemburg, mark.dickinson, serhiy.storchaka,

[issue29004] binascii.crc_hqx() implements CRC-CCITT

2016-12-18 Thread Martin Panter
New submission from Martin Panter: If I had known this it would have saved me getting a separate implementation working. >>> hex(binascii.crc_hqx(b"\x01", 0)) '0x1021' https://files.stairways.com/other/binhex-40-specs-info.txt Documenting this might helped many other people. Top Google hits