CTMWorker.js 339 B

12345678910111213141516171819
  1. importScripts( "lzma.js", "ctm.js" );
  2. self.onmessage = function( event ) {
  3. var files = [];
  4. for ( var i = 0; i < event.data.offsets.length; i ++ ) {
  5. var stream = new CTM.Stream( event.data.data );
  6. stream.offset = event.data.offsets[ i ];
  7. files[ i ] = new CTM.File( stream );
  8. }
  9. self.postMessage( files );
  10. self.close();
  11. };