[tor-bugs] #7158 [Stem]: String utilities for stem
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Sat Oct 20 17:21:42 UTC 2012
#7158: String utilities for stem
-------------------------+--------------------------------------------------
Reporter: atagar | Owner: neena
Type: enhancement | Status: needs_review
Priority: normal | Milestone:
Component: Stem | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Comment(by gsathya):
{{{
+SIZE_UNITS_BYTES = (
+ (1125899906842624.0, " PB", " Petabyte"),
+ (1099511627776.0, " TB", " Terabyte"),
+ (1073741824.0, " GB", " Gigabyte"),
+ (1048576.0, " MB", " Megabyte"),
+ (1024.0, " KB", " Kilobyte"),
+ (1.0, " B", " Byte"),
+)
}}}
On OS X 10.6+, 1 kb = 1000 bytes, not 1024 bytes. Not sure if it'll break
anything. Just, FYI - https://support.apple.com/kb/TS2419
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7158#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list