Friday, October 15, 2010

[Android Snippet] Adler32 in Android

Minimum API Level : 1
Key class: Adler32

Adler32 is one of checksum algorithms. Compared with other algorithms, Adler32 provides reliability for speed.
This snippet showing how to calculate Adler32 value in Android application


public long calculateAdler32(byte[] data){
Adler32 adler = new Adler32();
adler.update(data);
return adler.getValue();
}

No comments:

Post a Comment