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){ |
public long calculateAdler32(byte[] data){ |
Minimum API Level : 1
Key class: CRC32
CRC (Cyclic Redundancy Check) is one of checksum algorithms that designed for digital data verification purpose. This snippet is showing how to calculate CRC32 value from byte array data using CRC32 class
public long calculateCrc32(byte[] data){ |
Minimum API Level : 1
key class : GZipOutputStream , GZipInputStream
This snippet showing how to compressing file using GZipOuputStream and decompressing using GZipInputStream.
Compress
Log.v(TAG, "Start Compress"); |
Decompress
Log.v(TAG, "Start Decompress"); |
ActivityManager manager = (ActivityManager) |