Skip to content

Commit

Permalink
2009-03-26
Browse files Browse the repository at this point in the history
	* crc_models.py: added crc-32mpeg. Thanks to Thomas Edwards.
  • Loading branch information
tpircher-zz committed Nov 1, 2011
1 parent 5796fa1 commit 24dc5fb
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 4 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#
# Version 0.7.1, 2009-04-05
#

2009-03-26 Thomas Pircher <[email protected]>

* crc_models.py: added crc-32mpeg. Thanks to Thomas Edwards.

#
# Version 0.7, 2009-02-27
#
Expand Down
11 changes: 11 additions & 0 deletions crc_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,17 @@ class CrcModels(object):
'direct': True,
'check': 0xe3069283,
})
models.append({
'name': 'crc-32mpeg',
'width': 32,
'poly': 0x4c11db7,
'reflect_in': False,
'xor_in': 0xffffffff,
'reflect_out': False,
'xor_out': 0x0,
'direct': False,
'check': 0x0376e6e7,
})
models.append({
'name': 'posix',
'width': 32,
Expand Down
2 changes: 1 addition & 1 deletion crc_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Options(object):
Program details
"""
ProgramName = "pycrc"
Version = "0.7"
Version = "0.7.1"
VersionStr = "%s v%s" % (ProgramName, Version)
WebAddress = "http://www.tty1.net/pycrc/"

Expand Down
5 changes: 3 additions & 2 deletions doc/pycrc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY program_name "pycrc">
<!ENTITY program_version "0.7">
<!ENTITY program_version "0.7.1">
<!ENTITY author_firstname "Thomas">
<!ENTITY author_surname "Pircher">
<!ENTITY author_email "[email protected]">
<!ENTITY author "&author_firstname; &author_surname;">
<!ENTITY date "2009-02-27">
<!ENTITY date "2009-04-05">
<!ENTITY bit-by-bit "bit-by-bit">
<!ENTITY bit-by-bit-fast "bit-by-bit-fast">
<!ENTITY table-driven "table-driven">
Expand Down Expand Up @@ -223,6 +223,7 @@
<replaceable>crc-24</replaceable>,
<replaceable>crc-32</replaceable>,
<replaceable>crc-32c</replaceable>,
<replaceable>crc-32mpeg</replaceable>,
<replaceable>posix</replaceable>,
<replaceable>jam</replaceable>,
<replaceable>xfer</replaceable>,
Expand Down
12 changes: 11 additions & 1 deletion test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,17 @@ testbin "$opt" "$res"
#JAMCRC
res="0x340bc6d9"
cmd="$PYCRC --model jam"
opt="--width 32 --poly 0x04c11db7 --reflect-in 1 --xor-in 0xffffffff --reflect-out 1 --xor-out 0x0"
opt="--width 32 --poly 0x4c11db7 --reflect-in 1 --xor-in 0xffffffff --reflect-out 1 --xor-out 0x0"
teststr "$cmd" "$res"
teststr "$PYCRC $opt --direct 0" "$res"
teststr "$PYCRC $opt --direct 1" "$res"
testfil "$cmd" "$res"
testbin "$opt" "$res"

#CRC-32MPEG
res="0x376e6e7"
cmd="$PYCRC --model crc-32mpeg"
opt="--width 32 --poly 0x4c11db7 --reflect-in 0 --xor-in 0xffffffff --reflect-out 0 --xor-out 0x0"
teststr "$cmd" "$res"
teststr "$PYCRC $opt --direct 0" "$res"
teststr "$PYCRC $opt --direct 1" "$res"
Expand Down

0 comments on commit 24dc5fb

Please sign in to comment.