public static String zeropad(String s, int len) {
        if (s == null) s = "";
        StringBuffer buffer = new StringBuffer(s);
        int zerosNeeded = len - s.length();
        for (int i = 0 ; i < zerosNeeded ; ++i) {
            buffer.insert(0, '0');
        }
        return buffer.toString();
    }
Returns a string that is extended to 
length len with zeroes.
@param s The string to pad
@param len The length of the return string
@return A string that has been padded to be of legnth len
GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GConv.java