If your program has good results within about 5 seconds, then I might try it.
Trying to integrate it now…
oh wait, the jar format supports the lzma algorithm? since when?
No, 7z is using an algorithm like LZMA, yet ZIP compatible.
It works, as my shrinker output works
It usually gets best result within first 1000 tries, I can tweak it to do it within 5 seconds.
Also, ZIP specs:
http://www.pkware.com/documents/casestudies/APPNOTE.TXT
It states support for LZMA (method 14) in version 6.3. Yet, I guess many zippers would fail to decompress.
I tried creating a JAR and it runs just fine.
Hm… so Sos… seems you’re really using LZMA, as opposed to 7z (which is something else than 7zip).
progrd.java6.s2.pack.gz => 3472 bytes => [url=http://indiespot.net/app/java-four-kay-test?task=html&resource=download.49c5cf2a366148c8eb4d229fbeb0a81b.progrd.java6.s2&className=W]test[/url] (this one doesn't work) progrd.java6.bj.pack.gz => 3691 bytes => [url=http://indiespot.net/app/java-four-kay-test?task=html&resource=download.49c5cf2a366148c8eb4d229fbeb0a81b.progrd.java6.kp&className=W]test[/url] progrd.java6.pk.pack.gz => 3698 bytes => [url=http://indiespot.net/app/java-four-kay-test?task=html&resource=download.49c5cf2a366148c8eb4d229fbeb0a81b.progrd.java6.s2&className=W]test[/url] progrd.java6.7z.pack.gz => 3839 bytes => [url=http://indiespot.net/app/java-four-kay-test?task=html&resource=download.49c5cf2a366148c8eb4d229fbeb0a81b.progrd.java6.7z&className=W]test[/url] (existing 7z version that works)
The resulting files are smaller, but they are not zip compatible. :-\
Wow! cool
I don’t really know how your service works, but I think the issue is that gz is not exactly zip and output packed with my tool should be at the end of the chain, directly decompressed by JVM. I’ll provide a timeout functionality today (think 2-3 hrs from now).
EDIT: Updated! Added timeout function. Specify number of seconds (integer) as a third parameter, no timeout if 0 or omitted. Original download link from the first post applies.
Well… it is. If you don’t believe me, read the ZIP spec.
You can simply strip data off of a zip and end up with a GZ.
It’s how all other versions (kzip, bjwdeflate, 7z) are ‘converted’ to GZ in my service. So if yours doesn’t work, it’s either because your LZMA isn’t zip compatible, or I have some silly bug in my code
I guess it’s the former, as I can’t extract your soszip2.zip with any other unzipper than 7z. Even WinRAR can’t extract it.
WinRAR cannot extract LZMA zips at all, try to make one with 7-zip and see. I guess really not many archivers can do that (WinZip 12 claims to do so, I have to try it and see if it works).
I can make it output raw LZMA with any additional info if you can integrate that. Just tell me what you need.
EDIT: WinZIP 15.0 does fine extracting my zips.
Anything that the JVM fails to load (non-GZ and non-ZIP) won’t be of any use for compile-and-shrink.
I’m afraid your hard work isn’t usable for Java4K
The Zip files your utility creates are (obviously) much larger than the stripped-to-gz zips that kzip/bjwdeflate/7z create, IIRC your generated zip was 4050 bytes, way bigger than the kzip GZ.
Sos just curious, can your tool be used generically just to produce small .lzma files (non 4k and zip stuff) ?
also what language is your tool written in? be useful to be able use it on non windows systems.
I run his exe on Linux through Wine.
I’ll try to think something out. ZIP headers weigh 98 bytes + 2*filename length, so the overhead is actually relatively big.
It’s written in C, actually file extension say cpp, since MSVC 6.0 name mangling is necromancy. And i might have thrown in some bools by accident
Oh! I use some WinAPI functions for getting file time/date and polling keyboard. But i guess it’d be minutes to port that. I can provide source, but it’s really crappy, and I really don’t have time to port it myself or to tidy this up but i might be of assistance if needed.
PS. Cool, it runs in wine So I guess I won’t have to expose my crappy coding techniques
can’t extract the zip file here on linux
skipping: soszip2.exe need PK compat. v6.3 (can do v2.1)
edit: nvm, works with 7z not unzip
k, guess not, it only supports a single file and not a bunch of files or existing zip file. Also produces zip and not lzma.
I updated the tool with small batch file that uses pack200 to strip some data from the package. I hope this will give it some boost. The link remains in the first post.
Type sospack for usage info.
You have to stick a gz header on too.
Perhaps I’m doing something wrong, or I’m misunderstanding something, but I just attempted to use the LZMA method in 7z to construct a jar (and, thus, also the gz file which has a stripped header):
> 7z a -bd -tzip -mx=9 -mm=LZMA -mtc=off -mcl=on -mcu=off test.jar D.class
I attempted to use the resulting jar file in Chrome, and the JVM fails with “Cannot load class D”. Using the Deflate method instead doesn’t cause this error.
As said, the JVM doesn’t support the LZMA algorithm, hence I removed it from compile-and-shrink.
As said, the JVM doesn’t support the LZMA algorithm, hence I removed it from compile-and-shrink.
Ah, I overlooked that. Thanks.