~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to third_party/lzma.js/pre.js

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
// This is lzma.js, powered by lzip (which is GPL, source code at https://github.com/kripken/lzma.js)
 
3
var LZMA = {
 
4
  run: function(data, decompress) {
 
5
    var inputIndex = 0;
 
6
    var returnValue = [];
 
7
    var Module = {
 
8
      arguments: ['-q'].concat(decompress ? ['-d'] : []),
 
9
      stdin: function() { return inputIndex < data.length ? data[inputIndex++] : null },
 
10
      stdout: function(x) { if (x !== null) returnValue.push(x) }
 
11
    };
 
12
 
 
13