DVD download

Bryan J. Smith b.j.smith at ieee.org
Sat Mar 25 23:47:59 UTC 2006


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:b.j.smith at ieee.org       http://thebs413.blogspot.com
------------------------------------------------------------
****** Speed doesn't kill.  Difference in speed does! ******





More information about the amd64-list mailing list