export class Memory
{
    constructor (
        public value: number,
        public unit: MemoryUnity
    ) {}

    static format(input: number)
    {
        let dimension: number = 0;
        while (input > 1024)
        {
            input = input / 1024;
            dimension++;
        }
        return new Memory(input, dimension as MemoryUnity);
    }
}

export enum MemoryUnity
{
    RAW, KI, MI, GI, TI
}