kopia lustrzana https://github.com/viljoviitanen/pako
				
				
				
			fix crc32 & enable gzip test
							rodzic
							
								
									f733a66266
								
							
						
					
					
						commit
						18250b5298
					
				|  | @ -9,7 +9,7 @@ function makeTable() { | |||
|     for(var k =0; k < 8; k++){ | ||||
|       c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); | ||||
|     } | ||||
|     table[n] = c; | ||||
|     table[n] = c >>> 0; | ||||
|   } | ||||
| 
 | ||||
|   return table; | ||||
|  | @ -23,7 +23,7 @@ function crc32(crc, buf, len, pos) { | |||
|   var t = crcTable | ||||
|     , end = pos + len; | ||||
| 
 | ||||
|   crc = 0 ^ (-1); | ||||
|   crc = crc ^ (-1); | ||||
| 
 | ||||
|   for (var i = pos; i < end; i++ ) { | ||||
|     crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; | ||||
|  |  | |||
|  | @ -26,7 +26,7 @@ describe('Defaults', function () { | |||
| 
 | ||||
|   // OS_CODE can differ. Probably should add param to compare function
 | ||||
|   // to ignore some buffer positions
 | ||||
|   it.skip('gzip, no options', function(done) { | ||||
|   it('gzip, no options', function(done) { | ||||
|     testDeflate(zlib.createGzip, pako.gzip, samples, {}, done); | ||||
|   }); | ||||
| }); | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 nik
						nik