On 2006-12-01, at 11:19 EST, JFX Sundman wrote:

Setting allowRequestSOURCE=false in the lps.config file has the effect of making source at least a little harder to figure out when one is compiling to swf.

I wonder about obscuring source when compiling to DHTML. I understand that the compiled DHTML is not the same as the LZX source, but it's still human readable.

Is there any practicable way to obscure source when compiling to Ajax (DHTML)? It seems to me that this is logically impossible, by definition. But maybe I'm missing something.

I ask because a question came up on the forums today about how to hide source.

It is not logically possible.

Your program has to be interpreted by the runtime, so it has to be self-un-obscuring. You can do silly things like binhex it, etc. This is what a number of the Javascript 'compression' utilities do, prepending an un-binhexer to the code. I don't believe such utilities actually speed up your program at all, since the decompressor has to run in the Javacript interpreter. Clearly the browser's native zip compressor will be much more efficient in time and space. (The LPS compresses in non-debug mode by stripping all extraneous whitespace and comments and renaming all local variables. It still leaves the code somewhat legible by using implicit semicolons (newlines), which helps with debugging. We think this is the right level of compression.)

Of course, even though your compiled DHTML project is completely visible as Javascript, it is not giving away the 'source' of your project. If you have a look at the output of the compiler, you will find that it is pretty unpleasant to try to understand -- it bears little resemblance to the LZX source. Perhaps that makes a teeny advantage for the SWF runtime, since there the compiler output is byte-codes which are a teeny bit harder to reverse engineer, but there are plenty of tools out there for decompiling SWF's too.

Being an Open Source project, it is a little hard for me to have any enthusiasm for people wanting to keep their sources a secret. If you truly have a great product, your product is going to win on its merits.

Reply via email to