@Override
    public void write(DataWriter out) throws IOException {
        out.writeStringNull(signature);
        out.writeInt(streamVersion);
        out.writeStringNull(unityVersion.toString());
        out.writeStringNull(unityRevision.toString());
        out.writeUnsignedInt(minimumStreamedBytes);
        out.writeInt(headerSize);

        out.writeInt(numberOfLevelsToDownload);
        out.writeInt(levelByteEnd.size());

        for (Pair<Long, Long> offset : levelByteEnd) {
            out.writeUnsignedInt(offset.getLeft());
            out.writeUnsignedInt(offset.getRight());
        }

        if (streamVersion >= 2) {
            out.writeUnsignedInt(completeFileSize);
        }

        if (streamVersion >= 3) {
            out.writeUnsignedInt(dataHeaderSize);
        }

        out.writeUnsignedByte(0);
    }
Structure for Unity asset bundles.

@author Nico Bergemann <barracuda415 at yahoo.de>
@unity UnityWebStreamHeader
disunity-core/src/main/java/info/ata4/junity/bundle/BundleHeader.java