[{"data":1,"prerenderedAt":620},["ShallowReactive",2],{"navigation_docs":3,"-guide-agents":84,"-guide-agents-surround":615},[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":36,"body":86,"description":608,"extension":609,"links":610,"meta":611,"navigation":544,"path":37,"seo":613,"stem":38,"__hash__":614},"docs\u002F1.guide\u002F08.agents.md",{"type":87,"value":88,"toc":600},"minimark",[89,94,107,232,235,239,242,252,272,281,287,294,298,301,307,320,324,379,382,457,460,464,490,497,501,586,596],[90,91,93],"h2",{"id":92},"same-tools-every-host","Same tools, every host",[95,96,97,98,102,103,106],"p",{},"Four hosts, one set of executors. The MCP server, the Pi and OMP extensions and ",[99,100,101],"code",{},"@agntn\u002Fcompressions\u002Fai"," all call ",[99,104,105],{},"src\u002Ftool-operations.ts",". Same arguments, same checks, same text back. This site runs those executors too, so every tool dialog here shows exactly what a model reads.",[108,109,110,126],"table",{},[111,112,113],"thead",{},[114,115,116,120,123],"tr",{},[117,118,119],"th",{},"Tool",[117,121,122],{},"Does",[117,124,125],{},"Arguments",[127,128,129,158,191,217],"tbody",{},[114,130,131,137,140],{},[132,133,134],"td",{},[99,135,136],{},"compressions_compress",[132,138,139],{},"Compress text or bytes, give base64 or hex back",[132,141,142,145,146,145,149,145,152,145,155],{},[99,143,144],{},"format",", ",[99,147,148],{},"input",[99,150,151],{},"inputFormat",[99,153,154],{},"dataFormat",[99,156,157],{},"options",[114,159,160,165,168],{},[132,161,162],{},[99,163,164],{},"compressions_decompress",[132,166,167],{},"Decompress, show a window of the result",[132,169,170,145,172,145,175,145,177,145,180,145,183,145,186,145,189],{},[99,171,144],{},[99,173,174],{},"data",[99,176,154],{},[99,178,179],{},"outputFormat",[99,181,182],{},"offset",[99,184,185],{},"length",[99,187,188],{},"partial",[99,190,157],{},[114,192,193,198,205],{},[132,194,195],{},[99,196,197],{},"compressions_identify",[132,199,200,204],{},[201,202,203],"a",{"href":25},"Rank"," the formats some bytes decompress in, or peel them",[132,206,207,145,209,145,211,145,214],{},[99,208,174],{},[99,210,154],{},[99,212,213],{},"peel",[99,215,216],{},"depth",[114,218,219,224,227],{},[132,220,221],{},[99,222,223],{},"compressions_info",[132,225,226],{},"The list, or one format with its containers and options",[132,228,229,231],{},[99,230,144],{},", optional",[95,233,234],{},"Compressed bytes travel as base64 by default. A model can't send raw bytes, and base64 is what it gets handed most of the time anyway.",[90,236,238],{"id":237},"what-a-model-reads","What a model reads",[95,240,241],{},"A header line, then the value:",[243,244,250],"pre",{"className":245,"code":247,"language":248,"meta":249},[246],"language-text","deflate (container gzip) → 12 bytes, as utf8 (os 255, members 1):\n\"hello world!\"\n","text","",[99,251,247],{"__ignoreMap":249},[95,253,254,256,257,260,261,145,264,267,268,271],{},[99,255,179],{}," is ",[99,258,259],{},"auto"," by default. Readable text comes back quoted, anything else as hex. Ask for ",[99,262,263],{},"utf8",[99,265,266],{},"hex"," or ",[99,269,270],{},"base64"," and you get that.",[95,273,274,276,277,280],{},[99,275,197],{}," with ",[99,278,279],{},"peel: true"," lists the layers, outermost first, and hands over the bottom:",[243,282,285],{"className":283,"code":284,"language":248,"meta":249},[246],"3 layers, outermost first:\n1. bzip2 container bzip2, confidence 90: starts with its magic number; checksum matches; decodes to the last byte (level 9, blocks 1)\n   88 bytes, hex fd377a585a000004e6d6b4460200210116000000742fe5a3…\n2. lzma container xz, confidence 90: starts with its magic number; checksum matches; decodes to the last byte (check \"crc64\", blocks 1)\n   32 bytes, hex 1f8b08000000000000ffcb48cdc9c95728cf2fca495104006dc2b4030c000000\n3. deflate container gzip, confidence 100: starts with its magic number; checksum matches; decodes to the last byte; decompresses to readable text (os 255, members 1)\n   12 bytes, text \"hello world!\"\nInnermost, 12 bytes as base64:\naGVsbG8gd29ybGQh\n",[99,286,284],{"__ignoreMap":249},[95,288,289,290,293],{},"Everything the next call needs is in the text. An MCP client sees nothing else. Pi, OMP and the AI SDK get structured ",[99,291,292],{},"details"," as well.",[90,295,297],{"id":296},"what-they-refuse","What they refuse",[95,299,300],{},"Every schema is closed. A misspelled argument is an error, not a quiet default. An option that exists, but not for this format or this direction, gets named instead of swallowed:",[243,302,305],{"className":303,"code":304,"language":248,"meta":249},[246],"Ignored, deflate does not take here: level\n",[99,306,304],{"__ignoreMap":249},[95,308,309,310,313,314,316,317,319],{},"A broken stream is a tool error with the reason and the offset. The session carries on, and ",[99,311,312],{},"partial: true"," shows what came out before the damage. The output stops at 64 MiB and one answer shows 16 KiB unless ",[99,315,185],{}," asks for more, up to 1 MiB. ",[201,318,28],{"href":29}," has the rest. Nothing gets written to disk, and there's no network to reach.",[90,321,323],{"id":322},"mcp","MCP",[243,325,329],{"className":326,"code":327,"language":328,"meta":249,"style":249},"language-bash shiki shiki-themes compressions compressions compressions","compressions mcp\nclaude mcp add compressions --scope user -- npx -y @agntn\u002Fcompressions mcp\n","bash",[99,330,331,344],{"__ignoreMap":249},[332,333,336,340],"span",{"class":334,"line":335},"line",1,[332,337,339],{"class":338},"sK71F","compressions",[332,341,343],{"class":342},"shU9J"," mcp\n",[332,345,347,350,353,356,359,362,365,368,371,374,377],{"class":334,"line":346},2,[332,348,349],{"class":338},"claude",[332,351,352],{"class":342}," mcp",[332,354,355],{"class":342}," add",[332,357,358],{"class":342}," compressions",[332,360,361],{"class":342}," --scope",[332,363,364],{"class":342}," user",[332,366,367],{"class":342}," --",[332,369,370],{"class":342}," npx",[332,372,373],{"class":342}," -y",[332,375,376],{"class":342}," @agntn\u002Fcompressions",[332,378,343],{"class":342},[95,380,381],{},"Or in a client's config:",[243,383,387],{"className":384,"code":385,"language":386,"meta":249,"style":249},"language-json shiki shiki-themes compressions compressions compressions","{\n  \"mcpServers\": {\n    \"compressions\": { \"command\": \"npx\", \"args\": [\"-y\", \"@agntn\u002Fcompressions\", \"mcp\"] }\n  }\n}\n","json",[99,388,389,395,403,445,451],{"__ignoreMap":249},[332,390,391],{"class":334,"line":335},[332,392,394],{"class":393},"s38Sx","{\n",[332,396,397,400],{"class":334,"line":346},[332,398,399],{"class":338},"  \"mcpServers\"",[332,401,402],{"class":393},": {\n",[332,404,406,409,412,415,418,421,423,426,429,432,434,437,439,442],{"class":334,"line":405},3,[332,407,408],{"class":338},"    \"compressions\"",[332,410,411],{"class":393},": { ",[332,413,414],{"class":338},"\"command\"",[332,416,417],{"class":393},": ",[332,419,420],{"class":342},"\"npx\"",[332,422,145],{"class":393},[332,424,425],{"class":338},"\"args\"",[332,427,428],{"class":393},": [",[332,430,431],{"class":342},"\"-y\"",[332,433,145],{"class":393},[332,435,436],{"class":342},"\"@agntn\u002Fcompressions\"",[332,438,145],{"class":393},[332,440,441],{"class":342},"\"mcp\"",[332,443,444],{"class":393},"] }\n",[332,446,448],{"class":334,"line":447},4,[332,449,450],{"class":393},"  }\n",[332,452,454],{"class":334,"line":453},5,[332,455,456],{"class":393},"}\n",[95,458,459],{},"stdio, every tool read-only and idempotent.",[90,461,463],{"id":462},"pi-and-omp","Pi and OMP",[243,465,467],{"className":326,"code":466,"language":328,"meta":249,"style":249},"pi install npm:@agntn\u002Fcompressions\nomp install @agntn\u002Fcompressions\n",[99,468,469,480],{"__ignoreMap":249},[332,470,471,474,477],{"class":334,"line":335},[332,472,473],{"class":338},"pi",[332,475,476],{"class":342}," install",[332,478,479],{"class":342}," npm:@agntn\u002Fcompressions\n",[332,481,482,485,487],{"class":334,"line":346},[332,483,484],{"class":338},"omp",[332,486,476],{"class":342},[332,488,489],{"class":342}," @agntn\u002Fcompressions\n",[95,491,492,493,496],{},"Both extensions are declared in ",[99,494,495],{},"package.json"," and ship as source the host loads directly.",[90,498,500],{"id":499},"ai-sdk","AI SDK",[243,502,506],{"className":503,"code":504,"language":505,"meta":249,"style":249},"language-ts shiki shiki-themes compressions compressions compressions","import { generateText } from \"ai\";\nimport { compressionAiTools } from \"@agntn\u002Fcompressions\u002Fai\";\n\nawait generateText({\n  model,\n  tools: compressionAiTools,\n  prompt: \"What's inside H4sIAAAAAAAA\u002F8tIzcnJVyjPL8pJUQQAbcK0AwwAAAA=?\",\n});\n","ts",[99,507,508,526,540,546,557,562,568,580],{"__ignoreMap":249},[332,509,510,514,517,520,523],{"class":334,"line":335},[332,511,513],{"class":512},"skH_V","import",[332,515,516],{"class":393}," { generateText } ",[332,518,519],{"class":512},"from",[332,521,522],{"class":342}," \"ai\"",[332,524,525],{"class":393},";\n",[332,527,528,530,533,535,538],{"class":334,"line":346},[332,529,513],{"class":512},[332,531,532],{"class":393}," { compressionAiTools } ",[332,534,519],{"class":512},[332,536,537],{"class":342}," \"@agntn\u002Fcompressions\u002Fai\"",[332,539,525],{"class":393},[332,541,542],{"class":334,"line":405},[332,543,545],{"emptyLinePlaceholder":544},true,"\n",[332,547,548,551,554],{"class":334,"line":447},[332,549,550],{"class":512},"await",[332,552,553],{"class":338}," generateText",[332,555,556],{"class":393},"({\n",[332,558,559],{"class":334,"line":453},[332,560,561],{"class":393},"  model,\n",[332,563,565],{"class":334,"line":564},6,[332,566,567],{"class":393},"  tools: compressionAiTools,\n",[332,569,571,574,577],{"class":334,"line":570},7,[332,572,573],{"class":393},"  prompt: ",[332,575,576],{"class":342},"\"What's inside H4sIAAAAAAAA\u002F8tIzcnJVyjPL8pJUQQAbcK0AwwAAAA=?\"",[332,578,579],{"class":393},",\n",[332,581,583],{"class":334,"line":582},8,[332,584,585],{"class":393},"});\n",[95,587,588,591,592,595],{},[99,589,590],{},"compressionAiTools"," holds all four under the same names. Each one is exported alone too, ",[99,593,594],{},"compressionsDecompressTool"," and friends, if you'd rather hand a model fewer.",[597,598,599],"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 .shU9J, html code.shiki .shU9J{--shiki-light:var(--shiki-token-string);--shiki-default:var(--shiki-token-string);--shiki-dark:var(--shiki-token-string)}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);}html pre.shiki code .skH_V, html code.shiki .skH_V{--shiki-light:var(--shiki-token-keyword);--shiki-default:var(--shiki-token-keyword);--shiki-dark:var(--shiki-token-keyword)}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)}",{"title":249,"searchDepth":346,"depth":346,"links":601},[602,603,604,605,606,607],{"id":92,"depth":346,"text":93},{"id":237,"depth":346,"text":238},{"id":296,"depth":346,"text":297},{"id":322,"depth":346,"text":323},{"id":462,"depth":346,"text":463},{"id":499,"depth":346,"text":500},"The same tools over MCP and Pi and OMP and the AI SDK. What they take and what they refuse and what the model reads back","md",null,{"icon":612},"i-lucide-bot",{"title":36,"description":608},"h-vZa4c6p_RXGa-knSbBV6xP1cqkShVLx09BYEcY9aI",[616,618],{"title":32,"path":33,"stem":34,"description":617,"children":-1},"compress and decompress and identify and list from the terminal. Files or stdin in raw bytes or hex or base64",{"title":40,"path":41,"stem":42,"description":619,"children":-1},"defineCompression takes the metadata and two functions. Register the result and compress and decompress and the tools see it",1791071141269]