Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

CRC32 == 0?
Sorry, I'm not a mathematician and need the answer to a fairly simple
question: is it possible for the CRC32 of a file to be 0 when the file
is of nonzero length? It's fairly obvious that it's 0 when there is no
data but I'd like to be able to infer the reverse, that a CRC of 0 means
there was no data in the file. I expect the answer is "No, 0 is as
likely as any other value for a given sequence of bytes" but am hoping
to be proved wrong.

Thanks,
RM

Report this thread to moderator Post Follow-up to this message
Old Post
Rex Mottram
04-03-08 12:42 AM


Re: CRC32 == 0?
Rex Mottram <rexm@not.here> writes:

> Sorry, I'm not a mathematician and need the answer to a fairly simple
> question: is it possible for the CRC32 of a file to be 0 when the file
> is of nonzero length? It's fairly obvious that it's 0 when there is no
> data but I'd like to be able to infer the reverse, that a CRC of 0
> means there was no data in the file. I expect the answer is "No, 0 is
> as likely as any other value for a given sequence of bytes" but am
> hoping to be proved wrong.

No, 0 is as likely as anything.  Calculate the CRC of some data,
append the CRC to the end, and include this in the CRC calculation.
You should get a final CRC of zero.  Or something like that.

--
Måns Rullgård
mans@mansr.com

Report this thread to moderator Post Follow-up to this message
Old Post
Måns Rullgård
04-03-08 03:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Unix Programming archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 01:54 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.