Skip to content

Commit

Permalink
Updated readme.
Browse files Browse the repository at this point in the history
No longer pollute the global scope.
  • Loading branch information
nmrugg committed Nov 9, 2013
1 parent 6313bae commit 742ee2e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions readme.md
Expand Up @@ -59,9 +59,8 @@ want to use the (de)compressed data.

If the decompression progress is unable to be calculated, the on_progress() function will be triggered once with the value -1.

LZMA-JS will use [web workers](http://www.whatwg.org/specs/web-workers/current-work/) if they are available. If the
environment does not support web workers, it will create a few global functions (Worker(), onmessage(), and
postMessage()) to mimic the functionality.
LZMA-JS will try to use [web workers](http://www.whatwg.org/specs/web-workers/current-work/) if they are available. If the
environment does not support web workers, it will just do something else, and it won't pollute the global scope.

But I don't want to use Web Workers
---
Expand All @@ -78,7 +77,4 @@ That will create a global <code>LZMA</code> <code>object</code> that you can use

Note that this <code>LZMA</code> variable is an <code>object</code>, not a <code>function</code>.

This can also be done in Node.js.

/// Note that there are no parentheses after ".LZMA" because this LZMA variable is an object, not a function.
var my_lzma = require("lzma/lzma_worker.js").LZMA;
In Node.js, the Web Worker code is already skipped, so there's no reason to do this on that platform, though you could.

0 comments on commit 742ee2e

Please sign in to comment.