View previous topic :: View next topic |
Author |
Message |
V-Turn Visitor

Joined: 08 Jun 2003 Posts: 6
|
Posted: Sun Jun 08, 2003 3:40 am Post subject: Magic Engine cannot read some valid ZIP files |
|
|
I've just discovered ME, and though about using it to bring back some memories.
I have written a tiny Java utility to compress my *.pce files into ZIP files, but Magic Engine refuses to read the resulting files, even though they are valid ZIP files. Other programs accept those (WinZIP, WinRAR, etc.), but ME just does not see them. If I create the ZIP file using WinRAR, then ME does see them.
Anybody has any idea? What is the exact type of archive that ME can read?
Below is the corresponding method :
Code: | public static void makezipfile(File inputfile) throws IOException {
ZipOutputStream out = new ZipOutputStream(new FileOutputStream(inputfile.getAbsolutePath() + ".zip"));
FileInputStream in = new FileInputStream(inputfile);
out.putNextEntry(new ZipEntry(inputfile.getName()));
int len;
byte[] buf = new byte[1024];
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
out.closeEntry();
out.close();
} |
I can provide a sample ZIP file if needed.
V. |
|
Back to top |
|
 |
Specineff Elder

Joined: 29 Aug 2002 Posts: 258 Location: Arizona
|
Posted: Sun Jun 15, 2003 11:20 am Post subject: |
|
|
Why not just use regular Winzip or 123 Zip or Winrar? _________________ Proud owner of a Dreamcast, Saturn, Turbo Duo and a registered version of ME since 2002. |
|
Back to top |
|
 |
V-Turn Visitor

Joined: 08 Jun 2003 Posts: 6
|
Posted: Sun Jul 06, 2003 7:53 am Post subject: |
|
|
Specineff wrote: | Why not just use regular Winzip or 123 Zip or Winrar? |
Because I have hundred of roms in several folders/subfolder and want to compress them individually, while having specific names/locations for the resulting ZIP file. I do not know how to do this with WinRAR, nor think this would be possible actually.
So, is there any limitation on the kind of ZIP file that ME can read?
V. |
|
Back to top |
|
 |
Kaminari Elder

Joined: 19 Apr 2002 Posts: 1432 Location: Paris, France
|
Posted: Sun Jul 06, 2003 3:21 pm Post subject: |
|
|
David has wrote his own unzipper built in Magic Engine. But the code doesn't work perfect and won't recognize all zip archives. It should be fixed in the forthcoming 1.0 release. |
|
Back to top |
|
 |
Jedi Knight Visitor

Joined: 24 Jul 2003 Posts: 7
|
Posted: Sat Dec 06, 2003 11:00 am Post subject: |
|
|
If you have a lot of file in the same folder, just use "WinZip 9 beta 2".
This version has an option to compress multiple files into its own .zip (with the same name as the uncompressed file).
I think that WinRAR 3.20 has this feature too (don't remember).
regards |
|
Back to top |
|
 |
Jabberwok Elder

Joined: 24 Apr 2002 Posts: 532 Location: Quebec, Canada
|
Posted: Sun Dec 07, 2003 6:07 am Post subject: |
|
|
I remember that I once used DOS RAR to zip many roms in the past.
I also know that several ZIP utilities exist that can do batch file zipping... Just fire up google ( or the one you usually use )... _________________ If you translate Pole Position in French with babelfish you get 'Position de Polonais'... I think it's hilarious... from a French point of view. |
|
Back to top |
|
 |
|