Re: Magic numbers again

Justin Chapweske <[email protected]> Thu, 18 Jul 2002 19:03:25 -0500
Newsgroups gmane.comp.windows.devel.dime
Message-ID <[email protected]>
I applaud the addition of a version number and I agree that a magic
number would be nice.  They're pretty much standard for binary file formats.

Thanks,

-Justin

Dror Harari wrote:
>>Are you looking at the latest version of the DIME spec, released June
>>2002? One of the changes was the use of a 5-bit magic number at the
>>start of the record
>
>
> I was looking at the latest spec but my magic radar did not detect any
> magic in the 5-bit version number. After all, what magic is there in the
> number 1?
>
> Humor aside, a magic number is usually a number (8-bit to 32-bit) with
> somewhat low probability of showing up at that point in a typical document
> (or stream). I mentioned the potential benefits of a magic number - one
> cannot get those benefits with the version number.
>
> My original question was intended to understand the internal discussion
> that took place on this topic - I guessed it must have raised and rejected
> and I was curious... I am still interested in your insight on this.
>
> Lastly, there's a problem with my estimate (in the previous post) of the
> overhead of a magic number. Unless we put it only on the MB record, it
> would take extra 4-bytes per record, somewhat more that 4 bytes per
> message (and having different layout for the first and other messages is
> not elegant).
>
> /d



--
Justin Chapweske, Onion Networks
http://onionnetworks.com/