Skip to content

Commit

Permalink
Create Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Frotty committed Jun 11, 2017
1 parent 63162ac commit e3b0875
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ JMPQ3 is a small java library for accessing and modifying MoPaQ (.mpq,.w3m,.w3x)

MoPaQ is Blizzard's old, proprietary archive format for storing gamedata (replaced with CASC).

You can find more info and an excellent editor here http://www.zezula.net/en/mpq/main.html
You can find more info and an excellent graphical editor here http://www.zezula.net/en/mpq/main.html

## Get it
*currently only warcraft 3 maps and mpqs are fully supported. Mpqs from other games (WoW, starcraft) might cause problems.*
Expand Down Expand Up @@ -33,17 +33,18 @@ Quick API Overview:

Jmpq provides the OpenOptions `READ_ONLY` which should be selfexplanatory and `FORCE_V0` which forces the mpq to be opened like warcraft3 would open it, ignoring optional data from later specifications for compatability.
```java
JMpqEditor e = new JMpqEditor(new File("my.mpq")); //Opens a new editor
JMpqEditor e = new JMpqEditor(new File("my.mpq"), MPQOpenOption.FORCE_V0); //Opens a new editor
e.hasFile("filename") //Checks if the file exists
e.deleteFile("filename"); //Deletes a specific file out of the mpq
e.extractFile("filename", new File("target location")); //Extracts a specific file out of the mpq to the target location
e.insertFile("filename", new File("file to add"), true); //Inserts a specific into the mpq from the target location
e.extractAllFiles(new File("target folder")); //Extracts all files inside the mpq to the target folder. If a proper listfile exists, names will be used accordingly
e.getFileNames(); //Get the listfile as java HashSet<String>
e.close(); //Rebuilds the mpq and applies all changes that were made. Not needed in READ_ONLY mode
e.close(); //Rebuilds the mpq and applies all changes that were made. In readonly mode it only closes the filechannel.
```

###Known issues:
* To work around https://bugs.openjdk.java.net/browse/JDK-4724038 jmpq creates a lot of tempfiles
* JMPQ doesn't support all decompression algorithms. For compression only zlib is implemented.
* To work around https://bugs.openjdk.java.net/browse/JDK-4724038 jmpq creates tempfiles for every object in the mpq
* Unsupported decompression algorithms: sparse, pkware and bzip2
* Only supported compression is zlib
* JMPQ doesn't build a valid (attributes) file for now. (which seems to be fine for warcraft3)

0 comments on commit e3b0875

Please sign in to comment.