|
Riven
|
 |
« Reply #60 on: December 12, 2009, 02:36:56 pm » |
|
Server up and running... now streams the output, instead of a long delay.
|
|
|
|
|
Logged
|
|
|
|
|
Riven
|
 |
« Reply #61 on: December 12, 2009, 04:44:29 pm » |
|
Added kzip shrinker, using pjt33's gzip=>gz code A.java => 13931 bytes A.class => 11196 bytes A.normal.jar => 6846 bytes A.progrd.jar => 4480 bytes A.normal.pack => 5783 bytes A.progrd.pack => 5750 bytes A.normal.7z.pack.gz => 3597 bytes A.progrd.7z.pack.gz => 3513 bytes A.normal.kz.pack.gz => 3480 bytes A.progrd.kz.pack.gz => 3383 bytes
|
|
|
|
« Last Edit: December 12, 2009, 07:45:23 pm by Riven »
|
Logged
|
|
|
|
|
Eli Delventhal
|
 |
« Reply #62 on: December 12, 2009, 05:08:35 pm » |
|
Added kzip shrinker, using pjt33's gzip=>gz code A.java => 13931 bytes A.class => 11196 bytes A.normal.jar => 6846 bytes A.progrd.jar => 4480 bytes A.normal.pack => 5783 bytes A.progrd.pack => 5750 bytes A.normal.7z.pack.gz => 3597 bytes A.progrd.7z.pack.gz => 3513 bytes A.normal.kz.pack.gz => 3480 bytes A.progrd.kz.pack.gz => 3383 bytes
Holy moly. Lemme try it out. Wow! That works wonders! I can't believe how much more I can add now... F.java => 22744 bytes F.class => 11039 bytes F.normal.jar => 7002 bytes F.progrd.jar => 3843 bytes F.normal.pack => 4776 bytes F.progrd.pack => 4517 bytes F.normal.7z.pack.gz => 3177 bytes F.progrd.7z.pack.gz => 2997 bytes F.normal.kz.pack.gz => 3052 bytes F.progrd.kz.pack.gz => 2884 bytes Hm, I clicked the bottom two links (the kz links) and I get: FileNotFound: /home/indiespot/http-files/4k/64d01486f26c4116cf97b02a126867bd.4.pack.gz
The 7-zip links work, however.
|
|
|
|
« Last Edit: December 12, 2009, 05:10:15 pm by Demonpants »
|
Logged
|
|
|
|
|
Riven
|
 |
« Reply #63 on: December 12, 2009, 05:10:34 pm » |
|
I just made another update (thanks kapta) which reduces the size even more.
|
|
|
|
|
Logged
|
|
|
|
|
Riven
|
 |
« Reply #64 on: December 12, 2009, 05:12:48 pm » |
|
Hm, I clicked the bottom two links (the kz links) and I get: The 7-zip links work, however.
Thanks, fixed it!
|
|
|
|
« Last Edit: December 12, 2009, 05:21:40 pm by Riven »
|
Logged
|
|
|
|
SquashMonster
JGO n00b
Offline
Posts: 48
|
 |
« Reply #65 on: December 12, 2009, 05:44:45 pm » |
|
Oh my, this is too good to be true. My game just went from 4110 bytes to 3397. Thank you!
I'm almost at a loss for what to do with all that space, haha.
|
|
|
|
|
Logged
|
|
|
|
|
Riven
|
 |
« Reply #66 on: December 12, 2009, 07:43:57 pm » |
|
A.java => 13931 bytes A.class => 9627 bytes A.normal.jar => 6266 bytes A.progrd.jar => 3817 bytes A.normal.pack => 4707 bytes A.progrd.pack => 4430 bytes A.normal.7z.pack.gz => 3201 bytes A.progrd.7z.pack.gz => 3035 bytes A.normal.kz.pack.gz => 3077 bytes A.progrd.kz.pack.gz => 2932 bytes
|
|
|
|
|
Logged
|
|
|
|
|
moogie
|
 |
« Reply #67 on: December 13, 2009, 03:32:19 am » |
|
That is some serious compression! I have been attempting to replicate your results but so far have been unable to  The closest i have come is 1244 bytes compared to your tool's 1226 bytes for my sample code. My steps: 1. javac -target 1.5 a.java (version 1.6.0_12) 2. proguard (version 4.5 beta 2) with the following config file: -libraryjars "D:\Program Files\Java\jre6\lib\rt.jar" -injars "D:\temp\a.jar" -outjars "D:\temp\a.proguard.jar" -allowaccessmodification -overloadaggressively -optimizationpasses 99 -defaultpackage '' -keep public class a extends java.applet.Applet
note that the JRE version it uses is 1.6.0_13-b03. 3. pack200 with the following settings p.put(Packer.EFFORT, "9"); p.put(Packer.SEGMENT_LIMIT, "-1"); p.put(Packer.KEEP_FILE_ORDER, Packer.FALSE); p.put(Packer.CODE_ATTRIBUTE_PFX+"LineNumberTable", Packer.STRIP); p.put(Packer.CODE_ATTRIBUTE_PFX+"LocalVariableTable", Packer.STRIP); p.put(Packer.CODE_ATTRIBUTE_PFX+"StackMapTable", Packer.STRIP); p.put(Packer.CODE_ATTRIBUTE_PFX+"SourceFile", Packer.STRIP); p.put(Packer.CODE_ATTRIBUTE_PFX+"Deprecated", Packer.STRIP); p.put(Packer.CODE_ATTRIBUTE_PFX+"Exceptions", Packer.STRIP); p.put(Packer.CLASS_ATTRIBUTE_PFX+"LineNumberTable", Packer.STRIP); p.put(Packer.CLASS_ATTRIBUTE_PFX+"LocalVariableTable", Packer.STRIP); p.put(Packer.CLASS_ATTRIBUTE_PFX+"StackMapTable", Packer.STRIP); p.put(Packer.CLASS_ATTRIBUTE_PFX+"SourceFile", Packer.STRIP); p.put(Packer.CLASS_ATTRIBUTE_PFX+"Deprecated", Packer.STRIP); p.put(Packer.CLASS_ATTRIBUTE_PFX+"Exceptions", Packer.STRIP); p.put(Packer.METHOD_ATTRIBUTE_PFX+"LineNumberTable", Packer.STRIP); p.put(Packer.METHOD_ATTRIBUTE_PFX+"LocalVariableTable", Packer.STRIP); p.put(Packer.METHOD_ATTRIBUTE_PFX+"StackMapTable", Packer.STRIP); p.put(Packer.METHOD_ATTRIBUTE_PFX+"SourceFile", Packer.STRIP); p.put(Packer.METHOD_ATTRIBUTE_PFX+"Deprecated", Packer.STRIP); p.put(Packer.METHOD_ATTRIBUTE_PFX+"Exceptions", Packer.STRIP); p.put(Packer.MODIFICATION_TIME, Packer.LATEST); p.put(Packer.DEFLATE_HINT, Packer.FALSE); p.put(Packer.UNKNOWN_ATTRIBUTE, Packer.STRIP);
3. kzip the resultant pack file with the following command line option kzip.exe /rn /q /y /b 40 ...." found after a brute force search on block size. 4. using pjt33's zip to gz conversion code to produce the final result. Are you doing anything different or using different versions?
|
|
|
|
|
Logged
|
|
|
|
|
Riven
|
 |
« Reply #68 on: December 13, 2009, 05:02:50 am » |
|
I have been attempting to replicate your results but so far have been unable to  The closest i have come is 1244 bytes compared to your tool's 1226 bytes for my sample code. I'm actually doing much less. For javac: -g:none -target 1.5For proguard: -optimizationpasses 16 -keep public class *For pack200: -effort 9 --strip-debugFor 7z: (nothing) For kzip: -y -b{0,8,16,24,32,....,512}Ofcourse I could say I added a lot of dirty tricks, but it looks like I'm not even trying, doesn't it?
|
|
|
|
« Last Edit: December 13, 2009, 05:45:05 am by Riven »
|
Logged
|
|
|
|
|
Eli Delventhal
|
 |
« Reply #69 on: December 13, 2009, 10:45:56 am » |
|
Hey Riven, do you know that your tool works for all Applets? Mine doesn't seem to run. I haven't actually messed with it for, well, a year, so it's certainly possible that something's actually broken in my code, I don't know. I'm just curious if other people have been able to run applets packed with your system (using the 7-zip proguard).
|
|
|
|
|
Logged
|
|
|
|
|
Riven
|
 |
« Reply #70 on: December 13, 2009, 10:55:19 am » |
|
kevglass seems to be able to run his Emulator running Mario as an applet, after my shrinker did its job.
Keep in mind that for a *.pack.gz to be run as an applet, you have to request a *.jar from the server, at which time the webserver looks at the Accept-Encoding header, and returns the contents of a (potential) *.pack.gz file instead (thanks Sun, for making it so obvious)
|
|
|
|
« Last Edit: December 13, 2009, 10:58:34 am by Riven »
|
Logged
|
|
|
|
|
Eli Delventhal
|
 |
« Reply #71 on: December 13, 2009, 11:00:15 am » |
|
kevglass seems to be able to run his Emulator running Mario as an applet, after my shrinker did its job.
Keep in mind that for a *.pack.gz to be run as an applet, you have to request a *.jar from the server, at which time the webserver looks at the Accept-Encoding header, and returns the contents of a (potential) *.pack.gz file instead (thanks Sun, for making it so obvious)
Yeah. I submitted the file to Java4k and it doesn't run there, but assumedly Appel already has that webservice working. Looks like I need to dive back into that source code and see if I can remember what's going on...
|
|
|
|
|
Logged
|
|
|
|
|
Riven
|
 |
« Reply #72 on: December 13, 2009, 11:05:05 am » |
|
Hey Riven, do you know that your tool works for all Applets? Mine doesn't seem to run. I haven't actually messed with it for, well, a year, so it's certainly possible that something's actually broken in my code
Then try t run it as a JAR-applet. If it works there, and the pack.gz doesn't work, let me know.
|
|
|
|
|
Logged
|
|
|
|
|
Eli Delventhal
|
 |
« Reply #73 on: December 13, 2009, 11:10:03 am » |
|
Then try t run it as a JAR-applet. If it works there, and the pack.gz doesn't work, let me know.
Yeah, actually it was both applet-able and webstart-able and I just went and tried to compile/run it (using the main method) and all I got was a blank window. So it appears that I broke something somewhere along the way. Thanks.
|
|
|
|
|
Logged
|
|
|
|
|
pjt33
|
 |
« Reply #74 on: December 13, 2009, 01:04:13 pm » |
|
Hey Riven, do you know that your tool works for all Applets? Mine doesn't seem to run. I haven't actually messed with it for, well, a year, so it's certainly possible that something's actually broken in my code, I don't know. I'm just curious if other people have been able to run applets packed with your system (using the 7-zip proguard).
I'm not using Riven's system, but... I have a Proguard-pack200-kzip compilation script, and somewhere along the line it seems to be breaking the string which encodes my data. Once I work out what's going on there I should be able to upload my first game; my current suspicion is that Proguard is responsible. Edit: hadn't updated the script and Proguard 4.3 was breaking it. Proguard 4.4 not only fixes that problem but seems to compress a *lot* better.
|
|
|
|
« Last Edit: December 13, 2009, 03:17:42 pm by pjt33 »
|
Logged
|
|
|
|
|
moogie
|
 |
« Reply #75 on: December 13, 2009, 01:23:02 pm » |
|
I'm actually doing much less.
For javac: -g:none -target 1.5 For proguard: -optimizationpasses 16 -keep public class * For pack200: -effort 9 --strip-debug For 7z: (nothing) For kzip: -y -b{0,8,16,24,32,....,512}
Ofcourse I could say I added a lot of dirty tricks, but it looks like I'm not even trying, doesn't it?
i still think you have left out the call to doMagicStuff() in your steps  as i have run my sample though the steps you list and have created slightly worse result than I had before (1247 instead of 1244, compared to your 1226) The only thing i can think of is that we are using different versions of java and proguard and kzip. If it is not too much trouble can you tell me the versions you use? cheers!
|
|
|
|
|
Logged
|
|
|
|
|
Riven
|
 |
« Reply #76 on: December 13, 2009, 04:20:25 pm » |
|
The latest, downloaded them all over the last few days.
Well, except that I used JDK 6u15 instead of 6u17, and all software is running on Linux.
|
|
|
|
« Last Edit: December 13, 2009, 04:30:13 pm by Riven »
|
Logged
|
|
|
|
|
zammbi
|
 |
« Reply #77 on: December 13, 2009, 05:13:34 pm » |
|
A.java => 13931 bytes A.class => 9627 bytes A.normal.jar => 6266 bytes A.progrd.jar => 3817 bytes A.normal.pack => 4707 bytes A.progrd.pack => 4430 bytes A.normal.7z.pack.gz => 3201 bytes A.progrd.7z.pack.gz => 3035 bytes A.normal.kz.pack.gz => 3077 bytes A.progrd.kz.pack.gz => 2932 bytes Great stuff there. Now people can worry less on optimising. Off topic. Riven, I thought I was going slightly crazy when I saw your display pic. How does it get the username?
|
|
|
|
|
Logged
|
|
|
|
|
Riven
|
 |
« Reply #78 on: December 13, 2009, 05:19:27 pm » |
|
Great stuff there. Now people can worry less on optimising. That indeed is the point. It might not result in the absolute smallest file, but it levels the playing field a bit. Off topic. Riven, I thought I was going slightly crazy when I saw your display pic. How does it get the username?
Congratz, you are the first to notice without being told (I guess). It's magic, and it's watching you.
|
|
|
|
« Last Edit: December 13, 2009, 05:33:33 pm by Riven »
|
Logged
|
|
|
|
|
SimonH
|
 |
« Reply #79 on: December 13, 2009, 05:33:21 pm » |
|
IP based...
|
|
|
|
|
Logged
|
|
|
|
|
Riven
|
 |
« Reply #80 on: December 13, 2009, 05:34:15 pm » |
|
IP based...
That's too easy.
|
|
|
|
« Last Edit: December 13, 2009, 05:36:27 pm by Riven »
|
Logged
|
|
|
|
|
SimonH
|
 |
« Reply #81 on: December 13, 2009, 05:39:25 pm » |
|
...but how to get the usernames?
*edit* HAS to be a lookup table!? If not - I give in! It is magic!
|
|
|
|
« Last Edit: December 13, 2009, 05:46:50 pm by SimonH »
|
Logged
|
|
|
|
|
zammbi
|
 |
« Reply #82 on: December 13, 2009, 05:57:23 pm » |
|
Congratz, you are the first to notice without being told (I guess). It's magic, and it's watching you.
Well I was like wtf, did I really saw my user name in that image. So I right click and said show picture in a new tab. Then its url showed it as png, and then it really freaked me out  (Though maybe chrome supports animated pngs now days too) Then found out it was really a gif. I guess it gets the username from the forum somehow, but not totally sure how would it.
|
|
|
|
|
Logged
|
|
|
|
|
moogie
|
 |
« Reply #83 on: December 13, 2009, 06:21:25 pm » |
|
Now people can worry less on optimising.
I find creating tools to get the most compression the most enjoyable aspect of the competition  but some might call me strange!
|
|
|
|
|
Logged
|
|
|
|
|
steveyO
|
 |
« Reply #84 on: December 14, 2009, 12:30:17 am » |
|
I find creating tools to get the most compression the most enjoyable aspect of the competition Smiley but some might call me strange! Yep! Thats strange.. Mind you, wont complain if you release version 4  Wow.. So we have a magician at JGO.. Very impressive.. However after last refresh I am now pjt33 instead of steveyO.. Pretty cool nevertheless.. When I get 5mins break, gonna figure out how you do this..
|
|
|
|
|
Logged
|
|
|
|
|
Riven
|
 |
« Reply #85 on: December 14, 2009, 12:31:39 am » |
|
Wow.. So we have a magician at JGO.. Very impressive.. However after last refresh I am now pjt33 instead of steveyO.. Pretty cool nevertheless.. When I get 5mins break, gonna figure out how you do this..
Heuristics do fail every once in a while. Update: should fail less often now.
|
|
|
|
« Last Edit: December 14, 2009, 12:57:17 am by Riven »
|
Logged
|
|
|
|
|
zammbi
|
 |
« Reply #86 on: December 14, 2009, 01:19:56 am » |
|
I guess one way would be to keep looking at the who's online list when the image is pulled from the server. Enough polls would get it right.
|
|
|
|
|
Logged
|
|
|
|
|
pjt33
|
 |
« Reply #87 on: December 14, 2009, 02:44:26 am » |
|
I guess one way would be to keep looking at the who's online list when the image is pulled from the server. Enough polls would get it right.
I was just thinking along similar lines.
|
|
|
|
|
Logged
|
|
|
|
|
Riven
|
 |
« Reply #88 on: December 14, 2009, 02:50:39 am » |
|
I might be wrong, and I'm probably looking at the wrong code, but I think I'm using session hijacking and a zeroday security hole.
|
|
|
|
|
Logged
|
|
|
|
|
pjt33
|
 |
« Reply #89 on: December 14, 2009, 03:13:14 am » |
|
I might be wrong, and I'm probably looking at the wrong code, but I think I'm using session hijacking and a zeroday security hole.
I had a look for JavaScript but I couldn't find any, so I assumed you weren't actually hijacking the session. Hmm. Packet sniffing doesn't show an actual session hijack, but the referrer should allow you to see who's requesting the image.
|
|
|
|
« Last Edit: December 14, 2009, 03:18:46 am by pjt33 »
|
Logged
|
|
|
|
|