--- a/CRC32Stream.st Sun Mar 24 21:24:24 2019 +0100
+++ b/CRC32Stream.st Sun Mar 24 21:24:39 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 2003 by eXept Software AG
All Rights Reserved
@@ -108,37 +110,41 @@
Standard CRC method as defined by ISO 3309 [ISO-3309] or ITU-T V.42 [ITU-T-V42].
The default CRC polynomial employed is
- x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1
- (or 16r04C11DB7)
+ x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1
+ (or 16r04C11DB7)
- You can also create an instace performing the Castagnoli CRC-32C
+ You can also create an instance performing the Castagnoli CRC-32C
(used in iSCSI & SCTP [RFC3720], G.hn payload, SSE4.2):
- self newCrc32c
+ self newCrc32c
- poly: 16r1edc6f41
- = x32 + x28 + x27 + x26 + x25 + x23 + x22 + x20 + x19 + x18 + x14 + x13 + x11 + x10 + x9 + x8 + x6 + 1
+ the polynomial is: 16r1edc6f41
+ = x32 + x28 + x27 + x26 + x25 + x23 + x22 + x20 + x19 + x18 + x14 + x13 + x11 + x10 + x9 + x8 + x6 + 1
Notice that this CRC is also used with PNG images;
therefore, its performance directly affects png image processing (png write speed).
throughput:
- 235 Mb/s on MacBook Pro (2.6Ghz I7) (360 Mb/s for big chunks)
- 157 Mb/s on a 2.5Ghz 64X2 Athlon 4800+ (64bit)
- 150 Mb/s on 2Ghz Duo
+ 235 Mb/s on MacBook Pro (2.6Ghz I7)
+ (360 Mb/s for big chunks of size 50k)
+ (100 Mb/s for small chunks of size 10)
+ 157 Mb/s on a 2.5Ghz 64X2 Athlon 4800+ (64bit)
+ 150 Mb/s on 2Ghz Duo
+
new:
- 500 Mb/s for castagnoli on MacBook Pro (2.6Ghz I7) (5Gb/s for big chunks)
+ 500 Mb/s for castagnoli on MacBook Pro (2.6Ghz I7)
+ (5Gb/s for big chunks of size 50k)
[author:]
- Stefan Vogel (stefan@zwerg)
+ Stefan Vogel (stefan@zwerg)
[instance variables:]
[class variables:]
[see also:]
- SHA1Stream
- MD5Stream
+ SHA1Stream
+ MD5Stream
"
!
@@ -386,6 +392,16 @@
"Created: / 17-03-2019 / 16:45:42 / Claus Gittinger"
! !
+!CRC32Stream class methodsFor:'queries'!
+
+hashSize
+ "return the size of the hashvalue returned by instances of this class (in bytes)"
+
+ ^ 4
+
+ "Created: / 24-03-2019 / 12:52:47 / Claus Gittinger"
+! !
+
!CRC32Stream methodsFor:'initialization'!
generatorPolynom:anLSBInteger
@@ -562,3 +578,4 @@
version_CVS
^ '$Header$'
! !
+