@model long @{ string[] suffixes = {"", "K", "M", "G", "T", "P"}; double x = @Model; int i = 0; while (x > 1024) { x = x / 1024.0; i++; } if (i == 0){ @x bytes } else { @x @suffixes[i]iB }}