• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CheckSum

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is checksum?how java uses it for file compression??read some notes related to checksum but its confusing...can any1 explain it in detail?
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A "checksum" is a function that you compute using all the bytes of a file, message, or other chunk of data. If you compute the checksum before transmitting (or saving, or compressing) some data, then compute it again after the transmission (or after loading, or decompressing) then the two values should match. If they do, you can be pretty sure the transmission happened with no errors. If they don't match, you know the received data is corrupt.

One very common checksum algorithm is called CRC, "cyclic redundancy check." There's a java.util.zip.CRC32 class that implements this algorithm, and the GZIP stream classes use it to check the validity of data they process.
reply
    Bookmark Topic Watch Topic
  • New Topic