Skip to content

ByteSize

Static class in Oadm.Sdk.Formatting · Oadm.Sdk.dll

The one text of a number of bytes, for the server and the client: “512 bytes”, “412 KB”, “87.0 MB”, “1.2 GB”. Steps of 1,024; whole numbers below 1 MB, one decimal from MB on; the decimal point on every computer (a task step or a report written on the server reads the same in every client). A value that rounds up to 1,024 moves to the next unit (“1.0 MB”, never “1024 KB”). SDK 0.12.0.

public static class ByteSize
static string Progress(long done, long total)

How far a transfer is, both numbers in the unit of total: “37.0 of 82.4 MB”, “12 of 412 KB”. Without a total (zero or less) the text of done alone.

static string Text(long bytes)

“0 bytes”, “1 byte”, “1023 bytes”, “1 KB”, “412 KB”, “87.0 MB”, “1.2 GB”, “3.5 TB”; a negative number keeps its sign (“-1.5 MB”).