zlib.adler32() in Python
Last Updated :
23 Mar, 2020
With the help of zlib.adler32()
method, we can compute the checksum for adler32 to a particular data. It will give 32-bit integer value as a result by using zlib.adler32()
method.
Syntax : zlib.adler32(s)
Return : Return the unsigned 32-bit checksum integer.
Example #1 :
In this example we can see that by using zlib.adler32()
method, we are able to compute the unsigned 32-bit checksum for given data by using this method.
import zlib
s = b 'I love python, Hello world'
t = zlib.adler32(s)
print (t)
|
Output :
2073102698
Example #2 :
import zlib
s = b 'Hello GeeksForGeeks'
t = zlib.adler32(s)
print (t)
|
Output :
1156384538
Share your thoughts in the comments
Please Login to comment...