bugGNU Wget - Bugs: bug #23713, ISO byte-counting suffixes

 
 

bug #23713: ISO byte-counting suffixes

Submitted by:  None
Submitted on:  Thu 26 Jun 2008 12:28:37 PM UTC  
 
Category: User InterfaceSeverity: 2 - Minor
Priority: 5 - NormalStatus: Needs Discussion
Privacy: PublicAssigned to: None
Originator Name: Albert OliverOriginator Email: -unavailable-
Open/Closed: OpenRelease: 1.11.3
Operating System: GNU/LinuxReproducibility: Every Time
Fixed Release: NonePlanned Release: 1.15
Regression: NoneWork Required: None
Patch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 08 Nov 2010 01:23:15 PM UTC, comment #7:

I'd strongly support this change as well.

I didn't like this at all, for similar reasons to Micah's, but I've had to change my mind after constantly stumbling (when running experiments) into problems about the meaning of [GMK]B.

Usually, only referring to the source code can give a proper answer. Double checking everything just for this little difference adds up to a lot of wasted time before being able to compare measurements from different tools.

Though I still don't like the notation, I reckon it is a necessary evil for it to be clearly implemented as soon as possible (or at least, for a disambiguation paragraph to appear in the man page and other doc).

The coreutils [0] rely on a user-set environment variable to specify the meaning of the prefixes, but I think it would be much less error prone to adopt one notation or the other (or optionally both at the user's option) as per the standards' recommandations: K, M, G, ... for powers of 10, and Ki, Mi, Gi, ... for powers of 2.

And one more tool fixed... On to the next! (;

[0] http://www.gnu.org/software/coreutils/manual/html_node/Block-size.html

Olivier Mehani <shtrom>
Fri 19 Mar 2010 09:46:38 AM UTC, comment #6:

I just stumbled upon this page. I don't know where to find that list you were talking about but I'd like to second the implementation of unambigous prefixes of which the choice which one to use should be possible. I've already seen the use of the "new" prefixes in some programs and systems whereas hard disk manufacturers consistently use the SI style. So it depends on software maintainers to do it consistently, too, and I think the notion to have an ambiguition is not bad and should be supported.

Anonymous
Thu 26 Jun 2008 06:40:53 PM UTC, comment #5:

I agree that using the old-style prefixes is ambiguous, though I think folks are generally clear what Wget means by them. Disambiguation would be good, but I don't think I'll ever quite get used to KiB, MiB. I'll be happy to make the change, though, provided that's what folks want. I'm not sure, but I think at least one distro (Red Hat?) has already patched Wget to this end.

Micah Cowan <micahcowan>
Thu 26 Jun 2008 06:24:19 PM UTC, comment #4:

I don't know when MB had been used for powers of 2 in contexts such as these, but it seems that prefixes k, M, G, etc for powers of ten were standarized in 1960 [1]:

"The 11th CGPM (1960, Resolution 12) adopted a series of prefix names and prefix symbols to form the names and symbols of the decimal multiples and submultiples of SI units, ranging from 10^12 to 10^–12"

Anyway, I agree with you that it doesn't automatically mean that everybody just have to change everything. But using them make prefixes unambigous.

I agree with you in getting a community consensus so I'll bring it up to the list.

[1] http://www.bipm.org/en/si/si_brochure/chapter3/prefixes.html

Anonymous
Thu 26 Jun 2008 05:33:00 PM UTC, comment #3:

Defined to be powers of ten... by standards that have entered the scene long after MB had been used for powers of 2 in contexts such as these. Just because IEC says we should use something else, doesn't automatically mean we should just change everything. I'm not eager to move to that standard.

Nevertheless, I'm not completely opposed to it; but I'd like to get a community consensus on it. Please bring it up on the list for discussion.

Micah Cowan <micahcowan>
Thu 26 Jun 2008 01:12:58 PM UTC, comment #2:

Another typo:

In:

"It'ld have to be marked as:
19MB (as 19 * 10^9 B)
10MiB (as 18 * 2^20 B)"

It should say "19MB (as 19 * 10^6 B)" instead of "19MB (as 19 * 10^9 B)"

Anonymous
Thu 26 Jun 2008 12:34:15 PM UTC, comment #1:

There's a typo

In:

"It'ld have to be marked as:
19MB (as 19 * 10^9 B)
10MiB (as 18 * 2^20 B)"

It should say "18MiB (as 18 * 2^20 B)" instead of "10MiB (as 18 * 2^20 B)"

Anonymous
Thu 26 Jun 2008 12:28:37 PM UTC, original submission:

Wget displays or refers to quantities using power-of-two units (e.g. 1024, 1048576, etc.) but incorrectly applies prefixes that are defined as power-of-ten units (e.g. the prefix 'k' is 1000, 'M' i 1000000, etc.).

I've just found the next one:
Length: 19,189,400 (18M)

It'ld have to be marked as:
19MB (as 19 * 10^9 B)
10MiB (as 18 * 2^20 B)

Further explanation can be found at IEC[0], BIPM[1], wikipedia[2], and the US National Institute of Science and Technology[3]. There is software that correctly apply powers-of-ten and powers-of-two units to the corresponding quantities including 'linux' and 'coreutils', along with many application packages[4].

This bug report asks that the software be modified such that quantities and unit prefixes are in agreement as per the standards. This is done by changing either (or both) the quantity calculations or the unit prefixes such that they correspond correctly according to the relevant standards.
For example, if a quantity of 8178892 bytes is displayed as "7.8 MB", this is incorrectly showing a power-of-two quantity with a
power-of-ten unit. This can be resolved either by displaying the quantity as "7.8 MiB" (power-of-two quantity and unit) or as "8.18 MB" (power-of-ten quantity and unit). The degree of precision and rounding follows normal rules; what is addressed here is that the quantity and unit agree.

Similarly, if the software interprets input in power-of-two units, the program prompts and documentation should specify the correct unit for this. E.g. input which will be interpreted in units of 1024 bytes should be prompted for as "kibibytes" or "KiB", and the documentation should not refer to some other unit for the input.

[0] http://www.iec.ch/zone/si/si_bytes.htm
[1] http://www.bipm.fr/en/si/prefixes.html
[2] http://en.wikipedia.org/wiki/Binary_prefix
[3] http://physics.nist.gov/cuu/Units/prefixes.html
[4] http://en.wikipedia.org/wiki/Binary_prefix#Adoption

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by shtrom (Posted a comment)
  • -unavailable- added by micahcowan (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 24 Feb 2009 05:35:49 AM UTCmicahcowanSummaryPrefixes do not match =>ISO byte-counting suffixes
    Thu 26 Jun 2008 05:33:00 PM UTCmicahcowanSeverity3 - Normal=>2 - Minor
      StatusNone=>Needs Discussion
      Planned ReleaseNone=>1.15

    Back to the top


    Powered by Savane 3.1-cleanup1