[{"data":1,"prerenderedAt":217},["ShallowReactive",2],{"navigation_docs":3,"-formats-brotli":84,"-formats-brotli-surround":212},[4,48],{"title":5,"path":6,"stem":7,"children":8,"icon":47},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19,23,27,31,35,39,43],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"Compressing","\u002Fguide\u002Fcompressing","1.guide\u002F02.compressing",{"title":16,"path":17,"stem":18},"Containers","\u002Fguide\u002Fcontainers","1.guide\u002F03.containers",{"title":20,"path":21,"stem":22},"Checksums","\u002Fguide\u002Fchecksums","1.guide\u002F04.checksums",{"title":24,"path":25,"stem":26},"Identify and peel","\u002Fguide\u002Fidentify","1.guide\u002F05.identify",{"title":28,"path":29,"stem":30},"Limits","\u002Fguide\u002Flimits","1.guide\u002F06.limits",{"title":32,"path":33,"stem":34},"CLI","\u002Fguide\u002Fcli","1.guide\u002F07.cli",{"title":36,"path":37,"stem":38},"Agents","\u002Fguide\u002Fagents","1.guide\u002F08.agents",{"title":40,"path":41,"stem":42},"Custom formats","\u002Fguide\u002Fcustom","1.guide\u002F09.custom",{"title":44,"path":45,"stem":46},"Playground","\u002Fguide\u002Fplayground","1.guide\u002F10.playground","i-lucide-book-open",{"title":49,"path":50,"stem":51,"children":52,"icon":83},"Formats","\u002Fformats","2.formats\u002F00.index",[53,55,59,63,67,71,75,79],{"title":54,"path":50,"stem":51},"Every format",{"title":56,"path":57,"stem":58},"deflate","\u002Fformats\u002Fdeflate","2.formats\u002F01.deflate",{"title":60,"path":61,"stem":62},"bzip2","\u002Fformats\u002Fbzip2","2.formats\u002F02.bzip2",{"title":64,"path":65,"stem":66},"LZMA","\u002Fformats\u002Flzma","2.formats\u002F03.lzma",{"title":68,"path":69,"stem":70},"Zstandard","\u002Fformats\u002Fzstd","2.formats\u002F04.zstd",{"title":72,"path":73,"stem":74},"Brotli","\u002Fformats\u002Fbrotli","2.formats\u002F05.brotli",{"title":76,"path":77,"stem":78},"LZ4","\u002Fformats\u002Flz4","2.formats\u002F06.lz4",{"title":80,"path":81,"stem":82},"Unix compress","\u002Fformats\u002Flzw","2.formats\u002F07.lzw","i-lucide-library",{"id":85,"title":72,"body":86,"description":205,"extension":206,"links":207,"meta":208,"navigation":209,"path":73,"seo":210,"stem":74,"__hash__":211},"docs\u002F2.formats\u002F05.brotli.md",{"type":87,"value":88,"toc":201},"minimark",[89,93,102,161,167,172,182,186,194,197],[90,91],"format-facts",{"name":92},"brotli",[94,95,96,97,101],"p",{},"What your browser asked for when it said ",[98,99,100],"code",{},"Accept-Encoding: br",". LZ77 with Huffman codes that switch by context, and a built-in dictionary of words that show up on web pages, each one in 121 transformed forms. A distance past the window points into that dictionary instead of into the output.",[103,104,109],"pre",{"className":105,"code":106,"language":107,"meta":108,"style":108},"language-ts shiki shiki-themes compressions compressions compressions","decompress(\"brotli\", Buffer.from(\"1f3200f88dd44e777726aa32b40609617b53b358530d6440358300\", \"hex\"));\n\u002F\u002F { bytes: \"hello world! hello world! hello world! hello world!\",\n\u002F\u002F   details: { window: 16777200, metaBlocks: 1 } }\n","ts","",[98,110,111,148,155],{"__ignoreMap":108},[112,113,116,120,124,128,131,134,136,139,142,145],"span",{"class":114,"line":115},"line",1,[112,117,119],{"class":118},"sK71F","decompress",[112,121,123],{"class":122},"s38Sx","(",[112,125,127],{"class":126},"shU9J","\"brotli\"",[112,129,130],{"class":122},", Buffer.",[112,132,133],{"class":118},"from",[112,135,123],{"class":122},[112,137,138],{"class":126},"\"1f3200f88dd44e777726aa32b40609617b53b358530d6440358300\"",[112,140,141],{"class":122},", ",[112,143,144],{"class":126},"\"hex\"",[112,146,147],{"class":122},"));\n",[112,149,151],{"class":114,"line":150},2,[112,152,154],{"class":153},"scIB-","\u002F\u002F { bytes: \"hello world! hello world! hello world! hello world!\",\n",[112,156,158],{"class":114,"line":157},3,[112,159,160],{"class":153},"\u002F\u002F   details: { window: 16777200, metaBlocks: 1 } }\n",[94,162,163,164,166],{},"27 bytes from ",[98,165,92],{}," 1.2.0 for 51 bytes of text.",[168,169,171],"h2",{"id":170},"read-only","Read only",[94,173,174,175,177,178,181],{},"Same reason as zstd: the writer is a project of its own, and ",[98,176,92],{}," is a package install away. ",[98,179,180],{},"compress(\"brotli\", …)"," throws and says so.",[168,183,185],{"id":184},"no-magic-no-checksum","No magic, no checksum",[94,187,188,189,193],{},"A brotli stream starts with its window size in a few bits, and that's it. No magic number, no checksum. So ",[190,191,192],"a",{"href":25},"identify"," only counts brotli when it decodes every byte and gives something back, and even then scores it low. Random bytes decode as brotli now and then. A damaged stream can decode into the wrong bytes without an error, because there's nothing to check them against.",[94,195,196],{},"The dictionary ships inside the package, deflated and in base64, and gets inflated by this package's own deflate on first use.",[198,199,200],"style",{},"html pre.shiki code .sK71F, html code.shiki .sK71F{--shiki-light:var(--shiki-token-function);--shiki-default:var(--shiki-token-function);--shiki-dark:var(--shiki-token-function)}html pre.shiki code .s38Sx, html code.shiki .s38Sx{--shiki-light:var(--ui-text-highlighted);--shiki-default:var(--ui-text-highlighted);--shiki-dark:var(--ui-text-highlighted)}html pre.shiki code .shU9J, html code.shiki .shU9J{--shiki-light:var(--shiki-token-string);--shiki-default:var(--shiki-token-string);--shiki-dark:var(--shiki-token-string)}html pre.shiki code .scIB-, html code.shiki .scIB-{--shiki-light:var(--shiki-token-comment);--shiki-default:var(--shiki-token-comment);--shiki-dark:var(--shiki-token-comment)}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":108,"searchDepth":150,"depth":150,"links":202},[203,204],{"id":170,"depth":150,"text":171},{"id":184,"depth":150,"text":185},"RFC 7932 read in full. Context modeling and the built-in dictionary of 120 KiB of web words. Read only","md",null,{},true,{"title":72,"description":205},"3B83Hr-eVAeCDyyxun6rrJ06lj-gACppVQRarUXxUUc",[213,215],{"title":68,"path":69,"stem":70,"description":214,"children":-1},"RFC 8878 read in full. FSE and Huffman and repeat offsets and the XXH64 check. Read only",{"title":76,"path":77,"stem":78,"description":216,"children":-1},"Byte-aligned LZ77 with no entropy coding at all. The frame with its XXH32 checks and the legacy frame",1791071141270]