File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,11 @@ class Digest::Adler32 < ::Digest
22
22
end
23
23
24
24
def self.update (data, adler32 : UInt32 ) : UInt32
25
- slice = data.to_slice
26
- LibZ .adler32(adler32, slice, slice.size).to_u32
25
+ update data.to_slice, adler32
26
+ end
27
+
28
+ def self.update (data : Bytes , adler32 : UInt32 ) : UInt32
29
+ LibZ .adler32(adler32, data, data.size).to_u32
27
30
end
28
31
29
32
def self.combine (adler1 : UInt32 , adler2 : UInt32 , len) : UInt32
Original file line number Diff line number Diff line change @@ -22,8 +22,11 @@ class Digest::CRC32 < ::Digest
22
22
end
23
23
24
24
def self.update (data, crc32 : UInt32 ) : UInt32
25
- slice = data.to_slice
26
- LibZ .crc32(crc32, slice, slice.size).to_u32
25
+ update data.to_slice, crc32
26
+ end
27
+
28
+ def self.update (data : Bytes , crc32 : UInt32 ) : UInt32
29
+ LibZ .crc32(crc32, data, data.size).to_u32
27
30
end
28
31
29
32
def self.combine (crc1 : UInt32 , crc2 : UInt32 , len) : UInt32
You can’t perform that action at this time.
0 commit comments