static Unit fromString(String s) {
            return switch (s) {
                case "", "B", "bytes", "byte" -> BYTES;
                case "kB", "k", "K", "KB" -> KB;
                case "MB", "m", "M" -> MB;
                case "GB", "g", "G" -> GB;
                case "TB", "t", "T" -> TB;
                default -> throw new IllegalArgumentException("Invalid unit: " + s);
            };
        }
Reprents a quantity of bytes with a human-readable string representation.
Currently only supports binary units (e.g. 1 kB = 1024 bytes).

@author bjorncs
vespajlib/src/main/java/ai/vespa/utils/BytesQuantity.java