[{"data":1,"prerenderedAt":246},["ShallowReactive",2],{"navigation_docs":3,"-formats-lz4":84,"-formats-lz4-surround":241},[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":76,"body":86,"description":234,"extension":235,"links":236,"meta":237,"navigation":238,"path":77,"seo":239,"stem":78,"__hash__":240},"docs\u002F2.formats\u002F06.lz4.md",{"type":87,"value":88,"toc":230},"minimark",[89,93,97,162,167,178,201,211,215,226],[90,91],"format-facts",{"name":92},"lz4",[94,95,96],"p",{},"LZ4 skips the entropy coding entirely. Every sequence is a token byte, the literals as they are, a two-byte offset and a length. No bits to shuffle, so it reads at close to memory speed, and gives up some size for it.",[98,99,104],"pre",{"className":100,"code":101,"language":102,"meta":103,"style":103},"language-ts shiki shiki-themes compressions compressions compressions","compress(\"lz4\", \"hello world!\");                           \u002F\u002F 31 bytes, frame\ncompress(\"lz4\", \"hello world!\", { container: \"legacy\" });  \u002F\u002F 21 bytes\n","ts","",[105,106,107,137],"code",{"__ignoreMap":103},[108,109,112,116,120,124,127,130,133],"span",{"class":110,"line":111},"line",1,[108,113,115],{"class":114},"sK71F","compress",[108,117,119],{"class":118},"s38Sx","(",[108,121,123],{"class":122},"shU9J","\"lz4\"",[108,125,126],{"class":118},", ",[108,128,129],{"class":122},"\"hello world!\"",[108,131,132],{"class":118},");                           ",[108,134,136],{"class":135},"scIB-","\u002F\u002F 31 bytes, frame\n",[108,138,140,142,144,146,148,150,153,156,159],{"class":110,"line":139},2,[108,141,115],{"class":114},[108,143,119],{"class":118},[108,145,123],{"class":122},[108,147,126],{"class":118},[108,149,129],{"class":122},[108,151,152],{"class":118},", { container: ",[108,154,155],{"class":122},"\"legacy\"",[108,157,158],{"class":118}," });  ",[108,160,161],{"class":135},"\u002F\u002F 21 bytes\n",[163,164,166],"h2",{"id":165},"frame","Frame",[94,168,169,170,173,174,177],{},"The default. Magic ",[105,171,172],{},"04 22 4d 18",", a descriptor with its own XXH32 byte, blocks, an end mark, and the XXH32 of the content when ",[105,175,176],{},"checksum"," is on, which it is by default. Turning it off saves four bytes:",[98,179,181],{"className":100,"code":180,"language":102,"meta":103,"style":103},"compress(\"lz4\", \"hello world!\", { checksum: false }).length;  \u002F\u002F 27\n",[105,182,183],{"__ignoreMap":103},[108,184,185,187,189,191,193,195,198],{"class":110,"line":111},[108,186,115],{"class":114},[108,188,119],{"class":118},[108,190,123],{"class":122},[108,192,126],{"class":118},[108,194,129],{"class":122},[108,196,197],{"class":118},", { checksum: false }).length;  ",[108,199,200],{"class":135},"\u002F\u002F 27\n",[94,202,203,204,206,207,210],{},"The writer uses 4 MiB independent blocks, the same as ",[105,205,92],{}," with defaults. The reader takes linked blocks too, block checksums, a stated content size, and frames in a row. A frame that needs a dictionary is an ",[105,208,209],{},"UnsupportedError",".",[163,212,214],{"id":213},"legacy","Legacy",[94,216,217,218,221,222,225],{},"Magic ",[105,219,220],{},"02 21 4c 18",", then 8 MiB blocks each with its size, and nothing else. No checksum, no end mark. It's what ",[105,223,224],{},"lz4 -l"," writes and what the Linux kernel still boots from when it is built with LZ4.",[227,228,229],"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":103,"searchDepth":139,"depth":139,"links":231},[232,233],{"id":165,"depth":139,"text":166},{"id":213,"depth":139,"text":214},"Byte-aligned LZ77 with no entropy coding at all. The frame with its XXH32 checks and the legacy frame","md",null,{},true,{"title":76,"description":234},"CUlAaYYzpV3uefJRmBdX73pOPcsn2IvCHXnCpz9HBg4",[242,244],{"title":72,"path":73,"stem":74,"description":243,"children":-1},"RFC 7932 read in full. Context modeling and the built-in dictionary of 120 KiB of web words. Read only",{"title":80,"path":81,"stem":82,"description":245,"children":-1},"Lempel-Ziv-Welch with codes from 9 to 16 bits. The .Z files compress wrote and gzip still reads",1791071141270]