digest-crc 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5e688a7da7f932c40ddbfc271ac0fada5ec85a5b98bcfec9040d15279bef8a2
4
- data.tar.gz: 7f51652724f8b0e168d702e068a63e1b1ff7db080e2d6efd1b9930c57ac12c5b
3
+ metadata.gz: 60d4a283607198107ef66cb7e090570f5793c16c9641c791aff8a054d226655f
4
+ data.tar.gz: 4f4fb5821e6111d17e087a4160ea8f09a5cfd316324ae797f7a61be7cacd337a
5
5
  SHA512:
6
- metadata.gz: 88e32eb6fe7fb27b4ff1e3bbbffbe1680a9b22f7a58a1021518601bc6944279fa82acf9303bd70e62cce7fd7f8b168e079153a9a00241130f9cec339305f5874
7
- data.tar.gz: '093770c8846be1baa29522e3a15d35b114eb5836cd5ebc7f9fa64776330694e8a9111a429ba8c3e7d9885ae2a4093e73c9bccdefdc5974b1d4270795ed901e1a'
6
+ metadata.gz: '07919fa492ae97de8969e359ec02bd57a0525665cfc8bbca69203f76e1a20593611bc6aa20840fca3672f4f1e592b608282ea85222dcafa88ab44d07fbc5433f'
7
+ data.tar.gz: 790f52517a7abd4b24eef5d17fa168d53c9392775b2baba1e496703391f84704944eb8a0651c37fd7c3be3766e32d07609b0c0adf9877e188c02995ed2244105
@@ -16,6 +16,7 @@ jobs:
16
16
  - 2.5
17
17
  - 2.6
18
18
  - 2.7
19
+ - 3.0
19
20
  - jruby
20
21
  name: OS ${{ matrix.os }} / Ruby ${{ matrix.ruby }}
21
22
  steps:
data/ChangeLog.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.6.4 / 2021-07-14
2
+
3
+ * Silence potential method redefinition warnings when loading the C extensions.
4
+ (@ojab)
5
+
1
6
  ### 0.6.3 / 2020-12-19
2
7
 
3
8
  * Broaden rake dependency to >= 12.0.0, < 14.0.0` for ruby 2.7, which includes
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2020 Hal Brodigan
1
+ Copyright (c) 2010-2021 Hal Brodigan
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,11 +1,10 @@
1
1
  # Digest CRC
2
2
 
3
- [![Build Status](https://travis-ci.org/postmodern/digest-crc.svg?branch=master)](https://travis-ci.org/postmodern/digest-crc)
3
+ [![CI](https://github.com/postmodern/digest-crc/actions/workflows/ruby.yml/badge.svg)](https://github.com/postmodern/digest-crc/actions/workflows/ruby.yml)
4
4
 
5
5
  * [Source](https://github.com/postmodern/digest-crc)
6
6
  * [Issues](https://github.com/postmodern/digest-crc/issues)
7
7
  * [Documentation](http://rubydoc.info/gems/digest-crc/frames)
8
- * [Email](mailto:postmodern.mod3 at gmail.com)
9
8
 
10
9
  ## Description
11
10
 
@@ -15,33 +14,33 @@ module.
15
14
  ## Features
16
15
 
17
16
  * Provides support for the following CRC algorithms:
18
- * {Digest::CRC1 CRC1}
19
- * {Digest::CRC5 CRC5}
20
- * {Digest::CRC8 CRC8}
21
- * {Digest::CRC8_1Wire CRC8 1-Wire}
22
- * {Digest::CRC15 CRC15}
23
- * {Digest::CRC16 CRC16}
24
- * {Digest::CRC16CCITT CRC16 CCITT}
25
- * {Digest::CRC16DNP CRC16 DNP}
26
- * {Digest::CRC16Genibus CRC16 Genibus}
27
- * {Digest::CRC16Kermit CRC16 Kermit}
28
- * {Digest::CRC16Modbus CRC16 Modbus}
29
- * {Digest::CRC16USB CRC16 USB}
30
- * {Digest::CRC16X25 CRC16 X25}
31
- * {Digest::CRC16XModem CRC16 XModem}
32
- * {Digest::CRC16ZModem CRC16 ZModem}
33
- * {Digest::CRC16QT CRC16 QT}
34
- * {Digest::CRC24 CRC24}
35
- * {Digest::CRC32 CRC32}
36
- * {Digest::CRC32BZip2 CRC32 BZip2}
37
- * {Digest::CRC32c CRC32c}
38
- * {Digest::CRC32Jam CRC32 Jam}
39
- * {Digest::CRC32MPEG CRC32 MPEG}
40
- * {Digest::CRC32POSIX CRC32 POSIX}
41
- * {Digest::CRC32XFER CRC32 XFER}
42
- * {Digest::CRC64 CRC64}
43
- * {Digest::CRC64Jones CRC64 Jones}
44
- * {Digest::CRC64XZ CRC64 XZ}
17
+ * [CRC1](https://rubydoc.info/gems/digest-crc/Digest/CRC1)
18
+ * [CRC5](https://rubydoc.info/gems/digest-crc/Digest/CRC5)
19
+ * [CRC8](https://rubydoc.info/gems/digest-crc/Digest/CRC8)
20
+ * [CRC8 1-Wire](https://rubydoc.info/gems/digest-crc/Digest/CRC8_1Wire)
21
+ * [CRC15](https://rubydoc.info/gems/digest-crc/Digest/CRC15)
22
+ * [CRC16](https://rubydoc.info/gems/digest-crc/Digest/CRC16)
23
+ * [CRC16 CCITT](https://rubydoc.info/gems/digest-crc/Digest/CRC16CCITT)
24
+ * [CRC16 DNP](https://rubydoc.info/gems/digest-crc/Digest/CRC16DNP)
25
+ * [CRC16 Genibus](https://rubydoc.info/gems/digest-crc/Digest/CRC16Genibus)
26
+ * [CRC16 Kermit](https://rubydoc.info/gems/digest-crc/Digest/CRC16Kermit)
27
+ * [CRC16 Modbus](https://rubydoc.info/gems/digest-crc/Digest/CRC16Modbus)
28
+ * [CRC16 USB](https://rubydoc.info/gems/digest-crc/Digest/CRC16USB)
29
+ * [CRC16 X25](https://rubydoc.info/gems/digest-crc/Digest/CRC16X25)
30
+ * [CRC16 XModem](https://rubydoc.info/gems/digest-crc/Digest/CRC16XModem)
31
+ * [CRC16 ZModem](https://rubydoc.info/gems/digest-crc/Digest/CRC16ZModem)
32
+ * [CRC16 QT](https://rubydoc.info/gems/digest-crc/Digest/CRC16QT)
33
+ * [CRC24](https://rubydoc.info/gems/digest-crc/Digest/CRC24)
34
+ * [CRC32](https://rubydoc.info/gems/digest-crc/Digest/CRC32)
35
+ * [CRC32 BZip2](https://rubydoc.info/gems/digest-crc/Digest/CRC32BZip2)
36
+ * [CRC32c](https://rubydoc.info/gems/digest-crc/Digest/CRC32c)
37
+ * [CRC32 Jam](https://rubydoc.info/gems/digest-crc/Digest/CRC32Jam)
38
+ * [CRC32 MPEG](https://rubydoc.info/gems/digest-crc/Digest/CRC32MPEG)
39
+ * [CRC32 POSIX](https://rubydoc.info/gems/digest-crc/Digest/CRC32POSIX)
40
+ * [CRC32 XFER](https://rubydoc.info/gems/digest-crc/Digest/CRC32XFER)
41
+ * [CRC64](https://rubydoc.info/gems/digest-crc/Digest/CRC64)
42
+ * [CRC64 Jones](https://rubydoc.info/gems/digest-crc/Digest/CRC64Jones)
43
+ * [CRC64 XZ](https://rubydoc.info/gems/digest-crc/Digest/CRC64XZ)
45
44
  * Pure Ruby implementation.
46
45
  * Provides CRC Tables for optimized calculations.
47
46
  * Supports _optional_ C extensions which increases performance by ~40x.
@@ -139,42 +138,42 @@ end
139
138
 
140
139
  ## Benchmarks
141
140
 
142
- ### Pure Ruby (ruby 2.7.1)
141
+ ### Ruby 2.7.4 (pure Ruby)
143
142
 
144
143
  $ bundle exec rake clean
145
144
  $ bundle exec ./benchmarks.rb
146
145
  Loading Digest::CRC classes ...
147
146
  Generating 1000 8Kb lengthed strings ...
148
147
  Benchmarking Digest::CRC classes ...
149
- user system total real
150
- Digest::CRC1#update 0.349756 0.000002 0.349758 ( 0.351427)
151
- Digest::CRC5#update 1.175206 0.000049 1.175255 ( 1.180975)
152
- Digest::CRC8#update 1.023536 0.000015 1.023551 ( 1.029017)
153
- Digest::CRC8_1Wire#update 1.012156 0.000000 1.012156 ( 1.017342)
154
- Digest::CRC15#update 1.187286 0.000005 1.187291 ( 1.193634)
155
- Digest::CRC16#update 0.998527 0.000013 0.998540 ( 1.003940)
156
- Digest::CRC16CCITT#update 1.179864 0.000005 1.179869 ( 1.186134)
157
- Digest::CRC16DNP#update 1.018969 0.000003 1.018972 ( 1.025248)
158
- Digest::CRC16Genibus#update 1.196754 0.000065 1.196819 ( 1.203605)
159
- Digest::CRC16Modbus#update 1.007367 0.000000 1.007367 ( 1.012325)
160
- Digest::CRC16X25#update 1.044127 0.000000 1.044127 ( 1.052010)
161
- Digest::CRC16USB#update 1.012804 0.000000 1.012804 ( 1.018324)
162
- Digest::CRC16X25#update 1.009694 0.000000 1.009694 ( 1.015890)
163
- Digest::CRC16XModem#update 1.210814 0.000000 1.210814 ( 1.217951)
164
- Digest::CRC16ZModem#update 1.175239 0.000000 1.175239 ( 1.181395)
165
- Digest::CRC24#update 1.207431 0.000000 1.207431 ( 1.213373)
166
- Digest::CRC32#update 1.012334 0.000000 1.012334 ( 1.017671)
167
- Digest::CRC32BZip2#update 1.190351 0.000000 1.190351 ( 1.196567)
168
- Digest::CRC32c#update 1.021147 0.000000 1.021147 ( 1.027035)
169
- Digest::CRC32Jam#update 1.002365 0.000000 1.002365 ( 1.007202)
170
- Digest::CRC32MPEG#update 1.161925 0.000000 1.161925 ( 1.168058)
171
- Digest::CRC32POSIX#update 1.191860 0.000967 1.192827 ( 1.198722)
172
- Digest::CRC32XFER#update 1.217692 0.000000 1.217692 ( 1.224075)
173
- Digest::CRC64#update 3.084106 0.000000 3.084106 ( 3.106840)
174
- Digest::CRC64Jones#update 3.016687 0.000000 3.016687 ( 3.038963)
175
- Digest::CRC64XZ#update 3.019690 0.000000 3.019690 ( 3.040971)
176
-
177
- ### C extensions (ruby 2.7.1)
148
+ user system total real
149
+ Digest::CRC1#update 0.423741 0.000000 0.423741 ( 0.425887)
150
+ Digest::CRC5#update 1.486578 0.000011 1.486589 ( 1.493215)
151
+ Digest::CRC8#update 1.261386 0.000000 1.261386 ( 1.266399)
152
+ Digest::CRC8_1Wire#update 1.250344 0.000000 1.250344 ( 1.255009)
153
+ Digest::CRC15#update 1.482515 0.000000 1.482515 ( 1.488131)
154
+ Digest::CRC16#update 1.216744 0.000811 1.217555 ( 1.222228)
155
+ Digest::CRC16CCITT#update 1.480490 0.000000 1.480490 ( 1.486745)
156
+ Digest::CRC16DNP#update 1.200067 0.000000 1.200067 ( 1.204835)
157
+ Digest::CRC16Genibus#update 1.492910 0.000000 1.492910 ( 1.498923)
158
+ Digest::CRC16Modbus#update 1.217449 0.000003 1.217452 ( 1.222348)
159
+ Digest::CRC16QT#update 1.223311 0.000000 1.223311 ( 1.229211)
160
+ Digest::CRC16USB#update 1.233744 0.000000 1.233744 ( 1.238615)
161
+ Digest::CRC16X25#update 1.223077 0.000000 1.223077 ( 1.227607)
162
+ Digest::CRC16XModem#update 1.487674 0.000000 1.487674 ( 1.493316)
163
+ Digest::CRC16ZModem#update 1.484288 0.000000 1.484288 ( 1.490096)
164
+ Digest::CRC24#update 1.490272 0.000000 1.490272 ( 1.496027)
165
+ Digest::CRC32#update 1.225311 0.000000 1.225311 ( 1.230572)
166
+ Digest::CRC32BZip2#update 1.503096 0.000000 1.503096 ( 1.509202)
167
+ Digest::CRC32c#update 1.220390 0.000000 1.220390 ( 1.225487)
168
+ Digest::CRC32Jam#update 1.216066 0.000000 1.216066 ( 1.220591)
169
+ Digest::CRC32MPEG#update 1.486808 0.000000 1.486808 ( 1.492611)
170
+ Digest::CRC32POSIX#update 1.494508 0.000957 1.495465 ( 1.503262)
171
+ Digest::CRC32XFER#update 1.504802 0.005830 1.510632 ( 1.522066)
172
+ Digest::CRC64#update 3.260784 0.015674 3.276458 ( 3.310506)
173
+ Digest::CRC64Jones#update 3.195204 0.000000 3.195204 ( 3.213054)
174
+ Digest::CRC64XZ#update 3.173597 0.000000 3.173597 ( 3.190438)
175
+
176
+ ### Ruby 2.7.4 (C extensions)
178
177
 
179
178
  $ bundle exec rake build:c_exts
180
179
  ...
@@ -182,67 +181,217 @@ end
182
181
  Loading Digest::CRC classes ...
183
182
  Generating 1000 8Kb lengthed strings ...
184
183
  Benchmarking Digest::CRC classes ...
185
- user system total real
186
- Digest::CRC1#update 0.356025 0.000016 0.356041 ( 0.365345)
187
- Digest::CRC5#update 0.023957 0.000001 0.023958 ( 0.024835)
188
- Digest::CRC8#update 0.021254 0.000007 0.021261 ( 0.024647)
189
- Digest::CRC8_1Wire#update 0.039129 0.000000 0.039129 ( 0.042417)
190
- Digest::CRC15#update 0.030285 0.000000 0.030285 ( 0.030560)
191
- Digest::CRC16#update 0.023003 0.000000 0.023003 ( 0.023267)
192
- Digest::CRC16CCITT#update 0.028207 0.000000 0.028207 ( 0.028467)
193
- Digest::CRC16DNP#update 0.022861 0.000000 0.022861 ( 0.023111)
194
- Digest::CRC16Genibus#update 0.028041 0.000000 0.028041 ( 0.028359)
195
- Digest::CRC16Modbus#update 0.022931 0.000009 0.022940 ( 0.023560)
196
- Digest::CRC16X25#update 0.022808 0.000000 0.022808 ( 0.023054)
197
- Digest::CRC16USB#update 0.022258 0.000882 0.023140 ( 0.023418)
198
- Digest::CRC16X25#update 0.022816 0.000000 0.022816 ( 0.023084)
199
- Digest::CRC16XModem#update 0.027984 0.000000 0.027984 ( 0.028269)
200
- Digest::CRC16ZModem#update 0.027968 0.000000 0.027968 ( 0.028214)
201
- Digest::CRC24#update 0.028426 0.000000 0.028426 ( 0.028687)
202
- Digest::CRC32#update 0.022805 0.000000 0.022805 ( 0.023043)
203
- Digest::CRC32BZip2#update 0.025519 0.000000 0.025519 ( 0.025797)
204
- Digest::CRC32c#update 0.022807 0.000000 0.022807 ( 0.023069)
205
- Digest::CRC32Jam#update 0.023006 0.000000 0.023006 ( 0.023231)
206
- Digest::CRC32MPEG#update 0.025536 0.000000 0.025536 ( 0.025861)
207
- Digest::CRC32POSIX#update 0.025557 0.000000 0.025557 ( 0.025841)
208
- Digest::CRC32XFER#update 0.025310 0.000000 0.025310 ( 0.025599)
209
- Digest::CRC64#update 0.023182 0.000000 0.023182 ( 0.023421)
210
- Digest::CRC64Jones#update 0.022916 0.000000 0.022916 ( 0.023139)
211
- Digest::CRC64XZ#update 0.022879 0.000000 0.022879 ( 0.023131)
212
-
213
- ### Pure Ruby (jruby 9.2.12.0)
184
+ user system total real
185
+ Digest::CRC1#update 0.443619 0.000007 0.443626 ( 0.446545)
186
+ Digest::CRC5#update 0.025134 0.000806 0.025940 ( 0.026129)
187
+ Digest::CRC8#update 0.022564 0.000000 0.022564 ( 0.022775)
188
+ Digest::CRC8_1Wire#update 0.021427 0.000008 0.021435 ( 0.021551)
189
+ Digest::CRC15#update 0.030377 0.000833 0.031210 ( 0.031406)
190
+ Digest::CRC16#update 0.024004 0.000002 0.024006 ( 0.024418)
191
+ Digest::CRC16CCITT#update 0.026930 0.000001 0.026931 ( 0.027238)
192
+ Digest::CRC16DNP#update 0.024279 0.000000 0.024279 ( 0.024446)
193
+ Digest::CRC16Genibus#update 0.026477 0.000004 0.026481 ( 0.026656)
194
+ Digest::CRC16Modbus#update 0.023568 0.000000 0.023568 ( 0.023704)
195
+ Digest::CRC16QT#update 0.024161 0.000000 0.024161 ( 0.024316)
196
+ Digest::CRC16USB#update 0.023891 0.000000 0.023891 ( 0.024038)
197
+ Digest::CRC16X25#update 0.023849 0.000000 0.023849 ( 0.023991)
198
+ Digest::CRC16XModem#update 0.026254 0.000000 0.026254 ( 0.026523)
199
+ Digest::CRC16ZModem#update 0.026391 0.000000 0.026391 ( 0.026529)
200
+ Digest::CRC24#update 0.028805 0.000854 0.029659 ( 0.029830)
201
+ Digest::CRC32#update 0.024030 0.000000 0.024030 ( 0.024200)
202
+ Digest::CRC32BZip2#update 0.026942 0.000000 0.026942 ( 0.027244)
203
+ Digest::CRC32c#update 0.023989 0.000000 0.023989 ( 0.024159)
204
+ Digest::CRC32Jam#update 0.023940 0.000000 0.023940 ( 0.024066)
205
+ Digest::CRC32MPEG#update 0.027063 0.000000 0.027063 ( 0.027213)
206
+ Digest::CRC32POSIX#update 0.027137 0.000000 0.027137 ( 0.028160)
207
+ Digest::CRC32XFER#update 0.026956 0.000002 0.026958 ( 0.027103)
208
+ Digest::CRC64#update 0.024222 0.000005 0.024227 ( 0.024796)
209
+ Digest::CRC64Jones#update 0.025331 0.000000 0.025331 ( 0.025789)
210
+ Digest::CRC64XZ#update 0.024131 0.000001 0.024132 ( 0.024348)
211
+
212
+ ### Ruby 3.0.2 (pure Ruby)
214
213
 
214
+ $ bundle exec rake clean
215
+ $ bundle exec ./benchmarks.rb
216
+ Loading Digest::CRC classes ...
217
+ Generating 1000 8Kb lengthed strings ...
218
+ Benchmarking Digest::CRC classes ...
219
+ user system total real
220
+ Digest::CRC1#update 0.331405 0.000002 0.331407 ( 0.333588)
221
+ Digest::CRC5#update 1.206847 0.000020 1.206867 ( 1.224072)
222
+ Digest::CRC8#update 1.018571 0.000000 1.018571 ( 1.023002)
223
+ Digest::CRC8_1Wire#update 1.018802 0.000000 1.018802 ( 1.023292)
224
+ Digest::CRC15#update 1.207586 0.000000 1.207586 ( 1.212691)
225
+ Digest::CRC16#update 1.032505 0.000965 1.033470 ( 1.040862)
226
+ Digest::CRC16CCITT#update 1.198079 0.000000 1.198079 ( 1.203134)
227
+ Digest::CRC16DNP#update 0.994582 0.000000 0.994582 ( 1.006520)
228
+ Digest::CRC16Genibus#update 1.190596 0.000000 1.190596 ( 1.196087)
229
+ Digest::CRC16Modbus#update 1.007826 0.000000 1.007826 ( 1.012934)
230
+ Digest::CRC16QT#update 0.996298 0.000001 0.996299 ( 1.000255)
231
+ Digest::CRC16USB#update 0.995806 0.000000 0.995806 ( 0.999822)
232
+ Digest::CRC16X25#update 1.019589 0.000000 1.019589 ( 1.031010)
233
+ Digest::CRC16XModem#update 1.146947 0.000000 1.146947 ( 1.150817)
234
+ Digest::CRC16ZModem#update 1.145145 0.000000 1.145145 ( 1.149483)
235
+ Digest::CRC24#update 1.149009 0.000000 1.149009 ( 1.152854)
236
+ Digest::CRC32#update 0.970976 0.000000 0.970976 ( 0.974227)
237
+ Digest::CRC32BZip2#update 1.148596 0.000000 1.148596 ( 1.152381)
238
+ Digest::CRC32c#update 0.972566 0.000000 0.972566 ( 0.975790)
239
+ Digest::CRC32Jam#update 0.975854 0.000000 0.975854 ( 0.979217)
240
+ Digest::CRC32MPEG#update 1.148578 0.000000 1.148578 ( 1.153088)
241
+ Digest::CRC32POSIX#update 1.146218 0.000986 1.147204 ( 1.152460)
242
+ Digest::CRC32XFER#update 1.149823 0.000000 1.149823 ( 1.153692)
243
+ Digest::CRC64#update 2.869948 0.000016 2.869964 ( 2.884261)
244
+ Digest::CRC64Jones#update 2.867662 0.000000 2.867662 ( 2.886559)
245
+ Digest::CRC64XZ#update 2.858847 0.000000 2.858847 ( 2.874058)
246
+
247
+ ### Ruby 3.0.2 (C extensions)
248
+
249
+ $ bundle exec rake build:c_exts
250
+ ...
251
+ $ bundle exec ./benchmarks.rb
252
+ Loading Digest::CRC classes ...
253
+ Generating 1000 8Kb lengthed strings ...
254
+ Benchmarking Digest::CRC classes ...
255
+ user system total real
256
+ Digest::CRC1#update 0.349055 0.000000 0.349055 ( 0.350454)
257
+ Digest::CRC5#update 0.023144 0.000000 0.023144 ( 0.023248)
258
+ Digest::CRC8#update 0.021378 0.000000 0.021378 ( 0.021522)
259
+ Digest::CRC8_1Wire#update 0.021019 0.000000 0.021019 ( 0.021145)
260
+ Digest::CRC15#update 0.030063 0.000003 0.030066 ( 0.030245)
261
+ Digest::CRC16#update 0.024395 0.000000 0.024395 ( 0.024572)
262
+ Digest::CRC16CCITT#update 0.026979 0.000000 0.026979 ( 0.027138)
263
+ Digest::CRC16DNP#update 0.024665 0.000000 0.024665 ( 0.024844)
264
+ Digest::CRC16Genibus#update 0.027054 0.000000 0.027054 ( 0.027217)
265
+ Digest::CRC16Modbus#update 0.023963 0.000000 0.023963 ( 0.024257)
266
+ Digest::CRC16QT#update 0.024218 0.000000 0.024218 ( 0.024360)
267
+ Digest::CRC16USB#update 0.024393 0.000000 0.024393 ( 0.024561)
268
+ Digest::CRC16X25#update 0.025127 0.000000 0.025127 ( 0.025292)
269
+ Digest::CRC16XModem#update 0.028123 0.000000 0.028123 ( 0.028377)
270
+ Digest::CRC16ZModem#update 0.028205 0.000000 0.028205 ( 0.028571)
271
+ Digest::CRC24#update 0.031386 0.000000 0.031386 ( 0.031740)
272
+ Digest::CRC32#update 0.023832 0.000000 0.023832 ( 0.023948)
273
+ Digest::CRC32BZip2#update 0.027159 0.000000 0.027159 ( 0.027315)
274
+ Digest::CRC32c#update 0.024172 0.000000 0.024172 ( 0.024310)
275
+ Digest::CRC32Jam#update 0.024376 0.000000 0.024376 ( 0.024494)
276
+ Digest::CRC32MPEG#update 0.026035 0.000784 0.026819 ( 0.026940)
277
+ Digest::CRC32POSIX#update 0.026784 0.000000 0.026784 ( 0.026907)
278
+ Digest::CRC32XFER#update 0.026770 0.000000 0.026770 ( 0.026893)
279
+ Digest::CRC64#update 0.024400 0.000009 0.024409 ( 0.024531)
280
+ Digest::CRC64Jones#update 0.023477 0.000781 0.024258 ( 0.024390)
281
+ Digest::CRC64XZ#update 0.024611 0.000000 0.024611 ( 0.024779)
282
+
283
+ ### JRuby 9.2.18.0 (pure Ruby)
284
+
285
+ $ bundle exec ./benchmarks.rb
286
+ Loading Digest::CRC classes ...
287
+ Generating 1000 8Kb lengthed strings ...
288
+ Benchmarking Digest::CRC classes ...
289
+ user system total real
290
+ Digest::CRC1#update 1.080000 0.050000 1.130000 ( 0.676022)
291
+ Digest::CRC5#update 2.030000 0.040000 2.070000 ( 1.089240)
292
+ Digest::CRC8#update 1.590000 0.000000 1.590000 ( 0.999138)
293
+ Digest::CRC8_1Wire#update 0.920000 0.010000 0.930000 ( 0.873813)
294
+ Digest::CRC15#update 1.470000 0.030000 1.500000 ( 1.118886)
295
+ Digest::CRC16#update 1.780000 0.010000 1.790000 ( 1.067874)
296
+ Digest::CRC16CCITT#update 1.500000 0.070000 1.570000 ( 1.185564)
297
+ Digest::CRC16DNP#update 1.250000 0.000000 1.250000 ( 0.972322)
298
+ Digest::CRC16Genibus#update 1.700000 0.010000 1.710000 ( 1.092047)
299
+ Digest::CRC16Modbus#update 1.000000 0.010000 1.010000 ( 0.915328)
300
+ Digest::CRC16QT#update 1.250000 0.000000 1.250000 ( 0.968528)
301
+ Digest::CRC16USB#update 1.150000 0.010000 1.160000 ( 0.990387)
302
+ Digest::CRC16X25#update 0.940000 0.000000 0.940000 ( 0.926926)
303
+ Digest::CRC16XModem#update 1.390000 0.010000 1.400000 ( 1.100584)
304
+ Digest::CRC16ZModem#update 1.760000 0.020000 1.780000 ( 1.094003)
305
+ Digest::CRC24#update 1.690000 0.010000 1.700000 ( 1.106875)
306
+ Digest::CRC32#update 1.410000 0.020000 1.430000 ( 1.082506)
307
+ Digest::CRC32BZip2#update 1.510000 0.010000 1.520000 ( 1.104225)
308
+ Digest::CRC32c#update 1.270000 0.010000 1.280000 ( 1.023881)
309
+ Digest::CRC32Jam#update 1.190000 0.010000 1.200000 ( 0.998146)
310
+ Digest::CRC32MPEG#update 1.580000 0.010000 1.590000 ( 1.099086)
311
+ Digest::CRC32POSIX#update 1.550000 0.010000 1.560000 ( 1.142051)
312
+ Digest::CRC32XFER#update 1.360000 0.000000 1.360000 ( 1.071381)
313
+ Digest::CRC64#update 3.730000 0.020000 3.750000 ( 2.780390)
314
+ Digest::CRC64Jones#update 2.710000 0.020000 2.730000 ( 2.608007)
315
+ Digest::CRC64XZ#update 2.910000 0.020000 2.930000 ( 2.629401)
316
+
317
+ ### TruffleRuby 21.2.0 (pure Ruby)
318
+
319
+ $ bundle exec rake clean
320
+ $ bundle exec ./benchmarks.rb
321
+ Loading Digest::CRC classes ...
322
+ Generating 1000 8Kb lengthed strings ...
323
+ Benchmarking Digest::CRC classes ...
324
+ user system total real
325
+ Digest::CRC1#update 0.455340 0.000000 0.455340 ( 0.457710)
326
+ Digest::CRC5#update 1.406700 0.000000 1.406700 ( 1.412535)
327
+ Digest::CRC8#update 1.248323 0.000000 1.248323 ( 1.255452)
328
+ Digest::CRC8_1Wire#update 1.269434 0.000000 1.269434 ( 1.275315)
329
+ Digest::CRC15#update 1.428752 0.000000 1.428752 ( 1.434836)
330
+ Digest::CRC16#update 1.220394 0.000967 1.221361 ( 1.229684)
331
+ Digest::CRC16CCITT#update 1.434932 0.001000 1.435932 ( 1.452391)
332
+ Digest::CRC16DNP#update 1.191351 0.000000 1.191351 ( 1.202262)
333
+ Digest::CRC16Genibus#update 1.434067 0.000000 1.434067 ( 1.440300)
334
+ Digest::CRC16Modbus#update 1.200827 0.000000 1.200827 ( 1.205658)
335
+ Digest::CRC16QT#update 1.195077 0.000000 1.195077 ( 1.200328)
336
+ Digest::CRC16USB#update 1.196266 0.000000 1.196266 ( 1.201262)
337
+ Digest::CRC16X25#update 1.206690 0.000000 1.206690 ( 1.211781)
338
+ Digest::CRC16XModem#update 1.430468 0.000000 1.430468 ( 1.436801)
339
+ Digest::CRC16ZModem#update 1.442524 0.000000 1.442524 ( 1.448624)
340
+ Digest::CRC24#update 1.447611 0.000018 1.447629 ( 1.454534)
341
+ Digest::CRC32#update 1.214314 0.000000 1.214314 ( 1.219838)
342
+ Digest::CRC32BZip2#update 1.427408 0.000000 1.427408 ( 1.433626)
343
+ Digest::CRC32c#update 1.204985 0.000000 1.204985 ( 1.210273)
344
+ Digest::CRC32Jam#update 1.235039 0.000000 1.235039 ( 1.240686)
345
+ Digest::CRC32MPEG#update 1.429731 0.000000 1.429731 ( 1.435404)
346
+ Digest::CRC32POSIX#update 1.458886 0.000000 1.458886 ( 1.465914)
347
+ Digest::CRC32XFER#update 1.422109 0.000000 1.422109 ( 1.427635)
348
+ Digest::CRC64#update 3.283506 0.000000 3.283506 ( 3.303129)
349
+ Digest::CRC64Jones#update 3.297402 0.000000 3.297402 ( 3.317357)
350
+ Digest::CRC64XZ#update 3.278551 0.001875 3.280426 ( 3.315165)
351
+
352
+
353
+ ### TruffleRuby 21.2.0 (C extensions)
354
+
355
+ $ bundle exec rake build:c_exts
356
+ ...
215
357
  $ bundle exec ./benchmarks.rb
216
358
  Loading Digest::CRC classes ...
217
359
  Generating 1000 8Kb lengthed strings ...
218
360
  Benchmarking Digest::CRC classes ...
219
- user system total real
220
- Digest::CRC1#update 1.030000 0.090000 1.120000 ( 0.511189)
221
- Digest::CRC5#update 1.620000 0.060000 1.680000 ( 1.096031)
222
- Digest::CRC8#update 1.560000 0.070000 1.630000 ( 1.083921)
223
- Digest::CRC8_1Wire#update 0.930000 0.040000 0.970000 ( 0.927024)
224
- Digest::CRC15#update 1.590000 0.070000 1.660000 ( 1.132566)
225
- Digest::CRC16#update 1.650000 0.060000 1.710000 ( 1.074508)
226
- Digest::CRC16CCITT#update 1.610000 0.060000 1.670000 ( 1.190860)
227
- Digest::CRC16DNP#update 1.270000 0.010000 1.280000 ( 0.938132)
228
- Digest::CRC16Genibus#update 1.620000 0.030000 1.650000 ( 1.148556)
229
- Digest::CRC16Modbus#update 1.070000 0.020000 1.090000 ( 0.881455)
230
- Digest::CRC16X25#update 1.110000 0.010000 1.120000 ( 0.945366)
231
- Digest::CRC16USB#update 1.140000 0.000000 1.140000 ( 0.984367)
232
- Digest::CRC16X25#update 0.920000 0.010000 0.930000 ( 0.872541)
233
- Digest::CRC16XModem#update 1.530000 0.010000 1.540000 ( 1.092838)
234
- Digest::CRC16ZModem#update 1.720000 0.010000 1.730000 ( 1.164787)
235
- Digest::CRC24#update 1.810000 0.020000 1.830000 ( 1.084953)
236
- Digest::CRC32#update 1.590000 0.010000 1.600000 ( 1.105553)
237
- Digest::CRC32BZip2#update 1.520000 0.010000 1.530000 ( 1.070839)
238
- Digest::CRC32c#update 0.960000 0.010000 0.970000 ( 0.881989)
239
- Digest::CRC32Jam#update 1.030000 0.010000 1.040000 ( 0.907208)
240
- Digest::CRC32MPEG#update 1.420000 0.010000 1.430000 ( 0.994035)
241
- Digest::CRC32POSIX#update 1.530000 0.020000 1.550000 ( 1.106366)
242
- Digest::CRC32XFER#update 1.650000 0.010000 1.660000 ( 1.097647)
243
- Digest::CRC64#update 3.440000 0.030000 3.470000 ( 2.771806)
244
- Digest::CRC64Jones#update 2.630000 0.010000 2.640000 ( 2.628016)
245
- Digest::CRC64XZ#update 3.200000 0.020000 3.220000 ( 2.913442)
361
+ user system total real
362
+ Digest::CRC1#update 0.480586 0.000014 0.480600 ( 0.482817)
363
+ Digest::CRC5#update 0.023795 0.000000 0.023795 ( 0.023941)
364
+ Digest::CRC8#update 0.020619 0.000000 0.020619 ( 0.020747)
365
+ Digest::CRC8_1Wire#update 0.020571 0.000000 0.020571 ( 0.020700)
366
+ Digest::CRC15#update 0.031224 0.000000 0.031224 ( 0.031412)
367
+ Digest::CRC16#update 0.024013 0.000000 0.024013 ( 0.024174)
368
+ Digest::CRC16CCITT#update 0.026790 0.000000 0.026790 ( 0.027079)
369
+ Digest::CRC16DNP#update 0.024253 0.000000 0.024253 ( 0.024427)
370
+ Digest::CRC16Genibus#update 0.027237 0.000000 0.027237 ( 0.027390)
371
+ Digest::CRC16Modbus#update 0.024376 0.000000 0.024376 ( 0.024548)
372
+ Digest::CRC16QT#update 0.024361 0.000000 0.024361 ( 0.024518)
373
+ Digest::CRC16USB#update 0.024142 0.000000 0.024142 ( 0.024311)
374
+ Digest::CRC16X25#update 0.024098 0.000000 0.024098 ( 0.024222)
375
+ Digest::CRC16XModem#update 0.026306 0.000000 0.026306 ( 0.026502)
376
+ Digest::CRC16ZModem#update 0.026536 0.000000 0.026536 ( 0.026688)
377
+ Digest::CRC24#update 0.029732 0.000000 0.029732 ( 0.029902)
378
+ Digest::CRC32#update 0.024219 0.000000 0.024219 ( 0.024391)
379
+ Digest::CRC32BZip2#update 0.026817 0.000000 0.026817 ( 0.027044)
380
+ Digest::CRC32c#update 0.023681 0.000000 0.023681 ( 0.023798)
381
+ Digest::CRC32Jam#update 0.024243 0.000000 0.024243 ( 0.024419)
382
+ Digest::CRC32MPEG#update 0.026865 0.000000 0.026865 ( 0.027020)
383
+ Digest::CRC32POSIX#update 0.026583 0.000000 0.026583 ( 0.026748)
384
+ Digest::CRC32XFER#update 0.027423 0.000000 0.027423 ( 0.027615)
385
+ Digest::CRC64#update 0.024150 0.000000 0.024150 ( 0.024310)
386
+ Digest::CRC64Jones#update 0.024218 0.000000 0.024218 ( 0.024363)
387
+ Digest::CRC64XZ#update 0.024124 0.000000 0.024124 ( 0.024255)
388
+
389
+ ## Crystal
390
+
391
+ [crystal-crc] is a [Crystal][crystal-lang] port of this library.
392
+
393
+ [crystal-crc]: https://github.com/postmodern/crystal-crc
394
+ [crystal-lang]: https://www.crystal-lang.org/
246
395
 
247
396
  ## Thanks
248
397
 
@@ -252,6 +401,6 @@ including their CRC Tables.
252
401
 
253
402
  ## License
254
403
 
255
- Copyright (c) 2010-2020 Hal Brodigan
404
+ Copyright (c) 2010-2021 Hal Brodigan
256
405
 
257
406
  See {file:LICENSE.txt} for license information.
data/benchmarks.rb CHANGED
@@ -44,7 +44,7 @@ SAMPLES = Array.new(N) do
44
44
  end
45
45
 
46
46
  puts "Benchmarking Digest::CRC classes ..."
47
- Benchmark.bm do |b|
47
+ Benchmark.bm(27) do |b|
48
48
  CRCs.each_value do |crc|
49
49
  crc_class = Digest.const_get(crc)
50
50
  crc = crc_class.new
@@ -23,5 +23,6 @@ void Init_crc12_3gpp_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC12_3GPP = rb_const_get(mDigest, rb_intern("CRC12_3GPP"));
25
25
 
26
+ rb_undef_method(cCRC12_3GPP, "update");
26
27
  rb_define_method(cCRC12_3GPP, "update", Digest_CRC12_3GPP_update, 1);
27
28
  }
@@ -24,5 +24,6 @@ void Init_crc15_ext()
24
24
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
25
25
  VALUE cCRC15 = rb_const_get(mDigest, rb_intern("CRC15"));
26
26
 
27
+ rb_undef_method(cCRC15, "update");
27
28
  rb_define_method(cCRC15, "update", Digest_CRC15_update, 1);
28
29
  }
@@ -24,5 +24,6 @@ void Init_crc16_ext()
24
24
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
25
25
  VALUE cCRC16 = rb_const_get(mDigest, rb_intern("CRC16"));
26
26
 
27
+ rb_undef_method(cCRC16, "update");
27
28
  rb_define_method(cCRC16, "update", Digest_CRC16_update, 1);
28
29
  }
@@ -24,5 +24,6 @@ void Init_crc16_ccitt_ext()
24
24
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
25
25
  VALUE cCRC16CCITT = rb_const_get(mDigest, rb_intern("CRC16CCITT"));
26
26
 
27
+ rb_undef_method(cCRC16CCITT, "update");
27
28
  rb_define_method(cCRC16CCITT, "update", Digest_CRC16CCITT_update, 1);
28
29
  }
@@ -24,5 +24,6 @@ void Init_crc16_dnp_ext()
24
24
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
25
25
  VALUE cCRC16DNP = rb_const_get(mDigest, rb_intern("CRC16DNP"));
26
26
 
27
+ rb_undef_method(cCRC16DNP, "update");
27
28
  rb_define_method(cCRC16DNP, "update", Digest_CRC16DNP_update, 1);
28
29
  }
@@ -24,5 +24,6 @@ void Init_crc16_genibus_ext()
24
24
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
25
25
  VALUE cCRC16Genibus = rb_const_get(mDigest, rb_intern("CRC16Genibus"));
26
26
 
27
+ rb_undef_method(cCRC16Genibus, "update");
27
28
  rb_define_method(cCRC16Genibus, "update", Digest_CRC16Genibus_update, 1);
28
29
  }
@@ -24,5 +24,6 @@ void Init_crc16_kermit_ext()
24
24
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
25
25
  VALUE cCRC16Kermit = rb_const_get(mDigest, rb_intern("CRC16Kermit"));
26
26
 
27
+ rb_undef_method(cCRC16Kermit, "update");
27
28
  rb_define_method(cCRC16Kermit, "update", Digest_CRC16Kermit_update, 1);
28
29
  }
@@ -24,5 +24,6 @@ void Init_crc16_modbus_ext()
24
24
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
25
25
  VALUE cCRC16Modbus = rb_const_get(mDigest, rb_intern("CRC16Modbus"));
26
26
 
27
+ rb_undef_method(cCRC16Modbus, "update");
27
28
  rb_define_method(cCRC16Modbus, "update", Digest_CRC16Modbus_update, 1);
28
29
  }
@@ -24,5 +24,6 @@ void Init_crc16_usb_ext()
24
24
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
25
25
  VALUE cCRC16USB = rb_const_get(mDigest, rb_intern("CRC16USB"));
26
26
 
27
+ rb_undef_method(cCRC16USB, "update");
27
28
  rb_define_method(cCRC16USB, "update", Digest_CRC16USB_update, 1);
28
29
  }
@@ -24,5 +24,6 @@ void Init_crc16_x_25_ext()
24
24
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
25
25
  VALUE cCRC16X25 = rb_const_get(mDigest, rb_intern("CRC16X25"));
26
26
 
27
+ rb_undef_method(cCRC16X25, "update");
27
28
  rb_define_method(cCRC16X25, "update", Digest_CRC16X25_update, 1);
28
29
  }
@@ -24,5 +24,6 @@ void Init_crc16_xmodem_ext()
24
24
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
25
25
  VALUE cCRC16XModem = rb_const_get(mDigest, rb_intern("CRC16XModem"));
26
26
 
27
+ rb_undef_method(cCRC16XModem, "update");
27
28
  rb_define_method(cCRC16XModem, "update", Digest_CRC16XModem_update, 1);
28
29
  }
@@ -24,5 +24,6 @@ void Init_crc16_zmodem_ext()
24
24
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
25
25
  VALUE cCRC16ZModem = rb_const_get(mDigest, rb_intern("CRC16ZModem"));
26
26
 
27
+ rb_undef_method(cCRC16ZModem, "update");
27
28
  rb_define_method(cCRC16ZModem, "update", Digest_CRC16ZModem_update, 1);
28
29
  }
@@ -23,5 +23,6 @@ void Init_crc24_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC24 = rb_const_get(mDigest, rb_intern("CRC24"));
25
25
 
26
+ rb_undef_method(cCRC24, "update");
26
27
  rb_define_method(cCRC24, "update", Digest_CRC24_update, 1);
27
28
  }
@@ -23,5 +23,6 @@ void Init_crc32_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC32 = rb_const_get(mDigest, rb_intern("CRC32"));
25
25
 
26
+ rb_undef_method(cCRC32, "update");
26
27
  rb_define_method(cCRC32, "update", Digest_CRC32_update, 1);
27
28
  }
@@ -23,5 +23,6 @@ void Init_crc32_bzip2_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC32Bzip2 = rb_const_get(mDigest, rb_intern("CRC32BZip2"));
25
25
 
26
+ rb_undef_method(cCRC32Bzip2, "update");
26
27
  rb_define_method(cCRC32Bzip2, "update", Digest_CRC32Bzip2_update, 1);
27
28
  }
@@ -23,5 +23,6 @@ void Init_crc32_jam_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC32Jam = rb_const_get(mDigest, rb_intern("CRC32Jam"));
25
25
 
26
+ rb_undef_method(cCRC32Jam, "update");
26
27
  rb_define_method(cCRC32Jam, "update", Digest_CRC32Jam_update, 1);
27
28
  }
@@ -23,5 +23,6 @@ void Init_crc32_mpeg_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC32MPEG = rb_const_get(mDigest, rb_intern("CRC32MPEG"));
25
25
 
26
+ rb_undef_method(cCRC32MPEG, "update");
26
27
  rb_define_method(cCRC32MPEG, "update", Digest_CRC32MPEG_update, 1);
27
28
  }
@@ -23,5 +23,6 @@ void Init_crc32_posix_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC32POSIX = rb_const_get(mDigest, rb_intern("CRC32POSIX"));
25
25
 
26
+ rb_undef_method(cCRC32POSIX, "update");
26
27
  rb_define_method(cCRC32POSIX, "update", Digest_CRC32POSIX_update, 1);
27
28
  }
@@ -23,5 +23,6 @@ void Init_crc32_xfer_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC32XFER = rb_const_get(mDigest, rb_intern("CRC32XFER"));
25
25
 
26
+ rb_undef_method(cCRC32XFER, "update");
26
27
  rb_define_method(cCRC32XFER, "update", Digest_CRC32XFER_update, 1);
27
28
  }
@@ -23,5 +23,6 @@ void Init_crc32c_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC32c = rb_const_get(mDigest, rb_intern("CRC32c"));
25
25
 
26
+ rb_undef_method(cCRC32c, "update");
26
27
  rb_define_method(cCRC32c, "update", Digest_CRC32c_update, 1);
27
28
  }
@@ -23,5 +23,6 @@ void Init_crc5_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC5 = rb_const_get(mDigest, rb_intern("CRC5"));
25
25
 
26
+ rb_undef_method(cCRC5, "update");
26
27
  rb_define_method(cCRC5, "update", Digest_CRC5_update, 1);
27
28
  }
@@ -23,5 +23,6 @@ void Init_crc64_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC64 = rb_const_get(mDigest, rb_intern("CRC64"));
25
25
 
26
+ rb_undef_method(cCRC64, "update");
26
27
  rb_define_method(cCRC64, "update", Digest_CRC64_update, 1);
27
28
  }
@@ -23,5 +23,6 @@ void Init_crc64_jones_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC64Jones = rb_const_get(mDigest, rb_intern("CRC64Jones"));
25
25
 
26
+ rb_undef_method(cCRC64Jones, "update");
26
27
  rb_define_method(cCRC64Jones, "update", Digest_CRC64Jones_update, 1);
27
28
  }
@@ -23,5 +23,6 @@ void Init_crc64_xz_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC64XZ = rb_const_get(mDigest, rb_intern("CRC64XZ"));
25
25
 
26
+ rb_undef_method(cCRC64XZ, "update");
26
27
  rb_define_method(cCRC64XZ, "update", Digest_CRC64XZ_update, 1);
27
28
  }
@@ -23,5 +23,6 @@ void Init_crc8_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC8 = rb_const_get(mDigest, rb_intern("CRC8"));
25
25
 
26
+ rb_undef_method(cCRC8, "update");
26
27
  rb_define_method(cCRC8, "update", Digest_CRC8_update, 1);
27
28
  }
@@ -23,5 +23,6 @@ void Init_crc8_1wire_ext()
23
23
  VALUE mDigest = rb_const_get(rb_cObject, rb_intern("Digest"));
24
24
  VALUE cCRC81Wire = rb_const_get(mDigest, rb_intern("CRC8_1Wire"));
25
25
 
26
+ rb_undef_method(cCRC81Wire, "update");
26
27
  rb_define_method(cCRC81Wire, "update", Digest_CRC81Wire_update, 1);
27
28
  }
data/gemspec.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  name: digest-crc
2
- version: 0.6.3
2
+ version: 0.6.4
3
3
  summary: A Cyclic Redundancy Check (CRC) library for Ruby.
4
4
  description:
5
5
  Adds support for calculating Cyclic Redundancy Check (CRC) to the Digest
@@ -12,9 +12,9 @@ homepage: https://github.com/postmodern/digest-crc#readme
12
12
 
13
13
  metadata:
14
14
  documentation_uri: https://rubydoc.info/gems/digest-crc
15
- source_code_uri: https://github.com/postmodern/digest-crc
16
- bug_tracker_uri: https://github.com/postmodern/digest-crc/issues
17
- changelog_uri: https://github.com/postmodern/digest-crc/blob/master/ChangeLog.md
15
+ source_code_uri: https://github.com/postmodern/digest-crc
16
+ bug_tracker_uri: https://github.com/postmodern/digest-crc/issues
17
+ changelog_uri: https://github.com/postmodern/digest-crc/blob/master/ChangeLog.md
18
18
 
19
19
  extensions:
20
20
  - ext/digest/Rakefile
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digest-crc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Postmodern
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-20 00:00:00.000000000 Z
11
+ date: 2021-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -243,7 +243,7 @@ metadata:
243
243
  source_code_uri: https://github.com/postmodern/digest-crc
244
244
  bug_tracker_uri: https://github.com/postmodern/digest-crc/issues
245
245
  changelog_uri: https://github.com/postmodern/digest-crc/blob/master/ChangeLog.md
246
- post_install_message:
246
+ post_install_message:
247
247
  rdoc_options: []
248
248
  require_paths:
249
249
  - ext
@@ -259,8 +259,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
259
259
  - !ruby/object:Gem::Version
260
260
  version: '0'
261
261
  requirements: []
262
- rubygems_version: 3.1.4
263
- signing_key:
262
+ rubygems_version: 3.2.22
263
+ signing_key:
264
264
  specification_version: 4
265
265
  summary: A Cyclic Redundancy Check (CRC) library for Ruby.
266
266
  test_files: []