/**
 * Copyright 2013-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 */ var MOD = 65521 ; export default function adler32 ( data ) { var a = 1 ; var b = 0 ; var i = 0 ; var l = data . length ; var m = l & ~ 0x3 ; while ( i < m ) { var n = Math . min ( i + 4096 , m ) ; for ( ; i < n ; i += 4 ) { b += ( ( a += data . charCodeAt ( i ) ) + ( a += data . charCodeAt ( i + 1 ) ) + ( a += data . charCodeAt ( i + 2 ) ) + ( a += data . charCodeAt ( i + 3 ) ) ) ; } a %= MOD ; b %= MOD ; } for ( ; i < l ; i ++ ) { b += ( a += data . charCodeAt ( i ) ) ; } a %= MOD ; b %= MOD ; return '' + ( a | ( b << 16 ) ) ; }