private void writeUnpackInfo(List<Folder> folders) throws IOException {
        if (folders.isEmpty())
            return;

        writeByte((byte) Header.NID.kUnPackInfo);

        writeByte((byte) Header.NID.kFolder);
        writeNumber(folders.size());
        {
            writeByte((byte) 0);
            for (Folder folder : folders) {
                writeFolder(folder);
            }
        }

        writeByte((byte) Header.NID.kCodersUnPackSize);
        for (Folder folder : folders) {
            for (int j = 0; j < folder.getUnpackSizes().size(); j++)
                writeNumber(folder.getUnpackSizes().get(j));
        }
        List<Boolean> unpackCRCsDefined = new ArrayList<>();
        List<Integer> unpackCRCs = new ArrayList<>();
        unpackCRCsDefined.add(false);
        unpackCRCs.add(0);
        writeHashDigests(unpackCRCsDefined, unpackCRCs);

        writeByte((byte) Header.NID.kEnd);
    }