@@ -213,15 +213,13 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
213213 base64ReverseLookup [ 47 ] = 63 ; // '/'
214214 /** @noinline Inlining this function would mean expanding the base64 string 4x times in the source code, which Closure seems to be happy to do. */
215215 function base64DecodeToExistingUint8Array ( uint8Array , offset , b64 ) {
216- var b1 , b2 , i = 0 , j = offset , bLength = b64 . length , end = offset + ( bLength * 3 >> 2 ) ;
217- if ( b64 [ bLength - 2 ] == '=' ) -- end ;
218- if ( b64 [ bLength - 1 ] == '=' ) -- end ;
219- for ( ; i < bLength ; i += 4 , j += 3 ) {
216+ var b1 , b2 , i = 0 , j = offset , bLength = b64 . length , end = offset + ( bLength * 3 >> 2 ) - ( b64 [ bLength - 2 ] == '=' ) - ( b64 [ bLength - 1 ] == '=' ) ;
217+ for ( ; i < bLength ; i += 4 ) {
220218 b1 = base64ReverseLookup [ b64 . charCodeAt ( i + 1 ) ] ;
221219 b2 = base64ReverseLookup [ b64 . charCodeAt ( i + 2 ) ] ;
222- uint8Array [ j ] = base64ReverseLookup [ b64 . charCodeAt ( i ) ] << 2 | b1 >> 4 ;
223- if ( j + 1 < end ) uint8Array [ j + 1 ] = b1 << 4 | b2 >> 2 ;
224- if ( j + 2 < end ) uint8Array [ j + 2 ] = b2 << 6 | base64ReverseLookup [ b64 . charCodeAt ( i + 3 ) ] ;
220+ uint8Array [ j ++ ] = base64ReverseLookup [ b64 . charCodeAt ( i ) ] << 2 | b1 >> 4 ;
221+ if ( j < end ) uint8Array [ j ++ ] = b1 << 4 | b2 >> 2 ;
222+ if ( j < end ) uint8Array [ j ++ ] = b2 << 6 | base64ReverseLookup [ b64 . charCodeAt ( i + 3 ) ] ;
225223 }
226224 }
227225var bufferView = new Uint8Array ( wasmMemory . buffer ) ;
0 commit comments