This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* MultiFile - A JavaScript library to load multiple files from | |
| tar archives and json_packed files (see http://gist.github.com/407595) | |
| Example: Loading multiple images from a tarball. | |
| MultiFile.load('images.tar', function(xhr) { | |
| this.files.forEach(function(f) { | |
| var e = document.createElement('div'); | |
| document.body.appendChild(e); | |
| var p = document.createElement('p'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TarGZ = function(){}; | |
| // Load and parse archive, calls onload after loading all files. | |
| TarGZ.load = function(url, onload, onstream, onerror) { | |
| var o = new TarGZ(); | |
| o.onload = onload; | |
| o.onerror = onerror; | |
| o.onstream = onstream; | |
| o.load(url); | |
| return o; |