for (let i = 0; i &lt; 1024 * 1024; i++) { buf += Math.random() &gt; 0.5 ? &quot;{&quot; : &quot;}&quot;; }<p>Your sample data is bunk for determining the compression characteristics of braces in a realistic json file.