Parcourir la source

use a bigger buffer

Gildas il y a 7 ans
Parent
commit
3c7e78df6c
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      lib/single-file/base64.js

+ 1 - 1
lib/single-file/base64.js

@@ -144,7 +144,7 @@ this.base64 = this.base64 || (() => {
 		const len = uint8.length;
 		const len = uint8.length;
 		const extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
 		const extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
 		const parts = [];
 		const parts = [];
-		const maxChunkLength = 16383; // must be multiple of 3
+		const maxChunkLength = 1572864; // must be multiple of 3
 
 
 		// go through the array every three bytes, we"ll deal with trailing stuff later
 		// go through the array every three bytes, we"ll deal with trailing stuff later
 		for (let i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
 		for (let i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {