• Post Reply Bookmark Topic Watch Topic
  • New Topic

about actualize the CRC witn java  RSS feed

 
zhangChina lei
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello guys:
i want to write a code to actualize the CRC,but i don't understand
the algorism about it,
plase give me a help

thank you!!!
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, Java already has a class to do this: java.util.zip.CRC32. If you just want to calculate CRC values, using this class is the easiest way to do it. See here for an example. They use Adler32 rather than CRC32, but you can use both classes in exactly the same way since they both implement Checksum. Just replace Adler32 with CRC32.

Now if you want to write code to implement CRC yourself, without using existing classes, then I guess you'll have to read up on the algorithm. Googling "crc algorithm" gives many hits to different discussions. I suggest trying those until you find one that makes sense for you. Or post some more information here about exactly what you're trying to do, and what parts you understand so far, and what parts you're stuck on. Good luck.
 
zhangChina lei
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Jim,
i know it

thanks a lot
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!