mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
adler32: Properly break loop into 4096-char blocks
I believe this was lost in translation in #4400. Can't say I fully understand why this is significant at all though...
This commit is contained in:
@@ -25,7 +25,8 @@ function adler32(data) {
|
||||
var l = data.length;
|
||||
var m = l & ~0x3;
|
||||
while (i < m) {
|
||||
for (; i < Math.min(i + 4096, m); i += 4) {
|
||||
var n = Math.min(i + 4096, m);
|
||||
for (; i < n; i += 4) {
|
||||
b += (
|
||||
(a += data.charCodeAt(i)) +
|
||||
(a += data.charCodeAt(i + 1)) +
|
||||
|
||||
Reference in New Issue
Block a user