package org.mamago.util; public class Bits { // Prevent instantiation private Bits() {} public static int roundUpToLongSize(int size) { return roundUpToSize(size, 8); } public static int roundUpToSize(int size, int width) { // Formula: // (size + w) / w * w; // Adding w rounds up to the next whole width return ((size + width) / width) * width; } }