Fix typo mibibyte -> mebibyte.
You guys were supposed to let me know!! How did I not notice this?
This commit is contained in:
parent
3ddaa83edd
commit
8185da9add
3 changed files with 13 additions and 8 deletions
|
@ -13,8 +13,8 @@ from voussoirkit import pipeable
|
|||
|
||||
BYTE = 1
|
||||
KIBIBYTE = 1024 * BYTE
|
||||
MIBIBYTE = 1024 * KIBIBYTE
|
||||
GIBIBYTE = 1024 * MIBIBYTE
|
||||
MEBIBYTE = 1024 * KIBIBYTE
|
||||
GIBIBYTE = 1024 * MEBIBYTE
|
||||
TEBIBYTE = 1024 * GIBIBYTE
|
||||
PEBIBYTE = 1024 * TEBIBYTE
|
||||
EXIBYTE = 1024 * PEBIBYTE
|
||||
|
@ -23,7 +23,7 @@ YOBIBYTE = 1024 * ZEBIBYTE
|
|||
|
||||
BYTE_STRING = 'b'
|
||||
KIBIBYTE_STRING = 'KiB'
|
||||
MIBIBYTE_STRING = 'MiB'
|
||||
MEBIBYTE_STRING = 'MiB'
|
||||
GIBIBYTE_STRING = 'GiB'
|
||||
TEBIBYTE_STRING = 'TiB'
|
||||
PEBIBYTE_STRING = 'PiB'
|
||||
|
@ -31,10 +31,14 @@ EXIBYTE_STRING = 'EiB'
|
|||
ZEBIBYTE_STRING = 'ZiB'
|
||||
YOBIBYTE_STRING = 'YiB'
|
||||
|
||||
# backwards compatibility for a typo that survived way too long.
|
||||
MIBIBYTE = MEBIBYTE
|
||||
MIBIBYTE_STRING = MEBIBYTE_STRING
|
||||
|
||||
UNIT_STRINGS = {
|
||||
BYTE: BYTE_STRING,
|
||||
KIBIBYTE: KIBIBYTE_STRING,
|
||||
MIBIBYTE: MIBIBYTE_STRING,
|
||||
MEBIBYTE: MEBIBYTE_STRING,
|
||||
GIBIBYTE: GIBIBYTE_STRING,
|
||||
TEBIBYTE: TEBIBYTE_STRING,
|
||||
PEBIBYTE: PEBIBYTE_STRING,
|
||||
|
@ -42,6 +46,7 @@ UNIT_STRINGS = {
|
|||
ZEBIBYTE: ZEBIBYTE_STRING,
|
||||
YOBIBYTE: YOBIBYTE_STRING,
|
||||
}
|
||||
|
||||
REVERSED_UNIT_STRINGS = {value: key for (key, value) in UNIT_STRINGS.items()}
|
||||
UNIT_SIZES = sorted(UNIT_STRINGS.keys(), reverse=True)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ log = vlogging.get_logger(__name__)
|
|||
RNG = random.SystemRandom()
|
||||
|
||||
GZIP_MINIMUM_SIZE = 500 * bytestring.BYTE
|
||||
GZIP_MAXIMUM_SIZE = 5 * bytestring.MIBIBYTE
|
||||
GZIP_MAXIMUM_SIZE = 5 * bytestring.MEBIBYTE
|
||||
GZIP_LEVEL = 3
|
||||
|
||||
REQUEST_TYPES = (flask.Request, werkzeug.wrappers.Request, werkzeug.local.LocalProxy)
|
||||
|
|
|
@ -27,7 +27,7 @@ OVERWRITE_ALL = sentinel.Sentinel('overwrite all files')
|
|||
OVERWRITE_OLD = sentinel.Sentinel('overwrite old files')
|
||||
|
||||
# Number of bytes to read and write at a time
|
||||
CHUNK_SIZE = 2 * bytestring.MIBIBYTE
|
||||
CHUNK_SIZE = 2 * bytestring.MEBIBYTE
|
||||
|
||||
# When using dynamic chunk sizing, this is the ideal time to process a
|
||||
# single chunk, in seconds.
|
||||
|
@ -506,7 +506,7 @@ def copy_file(
|
|||
|
||||
dynamic_chunk_size = chunk_size == 'dynamic'
|
||||
if dynamic_chunk_size:
|
||||
chunk_size = bytestring.MIBIBYTE
|
||||
chunk_size = bytestring.MEBIBYTE
|
||||
|
||||
while True:
|
||||
chunk_start = time.perf_counter()
|
||||
|
@ -645,7 +645,7 @@ def hash_file(
|
|||
|
||||
dynamic_chunk_size = chunk_size == 'dynamic'
|
||||
if dynamic_chunk_size:
|
||||
chunk_size = bytestring.MIBIBYTE
|
||||
chunk_size = bytestring.MEBIBYTE
|
||||
|
||||
with handle:
|
||||
while True:
|
||||
|
|
Loading…
Reference in a new issue