FatDirectoryEntry[] compactForm() {
        if (this.realEntry.getShortName().equals(ShortName.DOT) ||
                this.realEntry.getShortName().equals(ShortName.DOT_DOT)) {
            /* the dot entries must not have a LFN */
            return new FatDirectoryEntry[]{this.realEntry};
        }
    
        if (ShortName.canConvert(fileName) && ShortName.get(fileName).asSimpleString().equals(fileName)) {
            /* do not add unnecessary LFN when the short name matches the original name */
            this.realEntry.setShortName(ShortName.get(fileName));
            return new FatDirectoryEntry[]{this.realEntry};
        }

        final int totalEntrySize = totalEntrySize();

        final FatDirectoryEntry[] entries =
                new FatDirectoryEntry[totalEntrySize];

        final byte checkSum = this.realEntry.getShortName().checkSum();
        int j = 0;
        final FatType type = parent.getFat().getFatType();
        
        for (int i = totalEntrySize - 2; i > 0; i--) {
            entries[i] = createPart(type, fileName.substring(j * 13, j * 13 + 13),
                    j + 1, checkSum, false);
            j++;
        }

        entries[0] = createPart(type, fileName.substring(j * 13),
                j + 1, checkSum, true);
        
        entries[totalEntrySize - 1] = this.realEntry;
        
        return entries;
    }