Re: DVD download

"Bryan J. Smith" <[email protected]> Sat, 25 Mar 2006 18:47:59 -0500
Newsgroups gmane.linux.redhat.amd64
Message-ID <[email protected]>
On Sat, 2006-03-25 at 10:20 -0600, Jonathan Berry wrote:
> Exactly.  Which begs the question, why in the world is a file size
> being represented with a *signed* number?

Oh, many reasons.

1.  A negative value could be used in many ways
2.  Easier to test for overflow than unsigned
3.  Portability, uniformity, etc...
4.  It's not always ideal to mix signed and unsigned integers

Your question should probably be, "why aren't they just always using 64-
bit integers?"  Especially on a codebase that is 2000+

> Last time I checked, most of the time file sizes are 0 or positive :).

Again, see #1.

> I think I used Firefox once to download a DVD iso.  I saw the strange
> progress bar behavior, but it still downloaded fine.

Yes, as long as it's under 4GiB, it should be.  In fact, it could be
that they are mixing signed and unsigned numbers.


-- 
Bryan J. Smith             Professional, technical annoyance
mailto:[email protected]       http://thebs413.blogspot.com
------------------------------------------------------------
****** Speed doesn't kill.  Difference in speed does! ******