[{"data":1,"prerenderedAt":616},["ShallowReactive",2],{"navigation":3,"\u002Fcontributing":222,"\u002Fcontributing-surround":613},[4,8,168,206,210,214,218],{"title":5,"path":6,"stem":7},"Quickstart","\u002Fquickstart","01.quickstart",{"title":9,"path":10,"stem":11,"children":12},"Concepts","\u002Fconcepts","20.concepts",[13,15,19,23,84,88,92,96,100],{"title":9,"path":10,"stem":14},"20.concepts\u002Findex",{"title":16,"path":17,"stem":18},"Preprocessing Graph","\u002Fconcepts\u002Fppg","20.concepts\u002F2.ppg",{"title":20,"path":21,"stem":22},"Plane decomposition","\u002Fconcepts\u002Fplanes","20.concepts\u002F3.planes",{"title":24,"path":25,"stem":26,"children":27},"Codecs","\u002Fconcepts\u002Fcodecs","20.concepts\u002F4.codecs",[28,32,36,40,44,48,52,56,60,64,68,72,76,80],{"title":29,"path":30,"stem":31},"Arithmetic","\u002Fconcepts\u002Fcodecs\u002Farithmetic","20.concepts\u002Fcodecs\u002Farithmetic",{"title":33,"path":34,"stem":35},"Context Mixing Lite","\u002Fconcepts\u002Fcodecs\u002Fcontext-mixing-lite","20.concepts\u002Fcodecs\u002Fcontext-mixing-lite",{"title":37,"path":38,"stem":39},"FPC","\u002Fconcepts\u002Fcodecs\u002Ffpc","20.concepts\u002Fcodecs\u002Ffpc",{"title":41,"path":42,"stem":43},"Huffman LLM 5-Bit","\u002Fconcepts\u002Fcodecs\u002Fhuff-llm","20.concepts\u002Fcodecs\u002Fhuff-llm",{"title":45,"path":46,"stem":47},"Huffman","\u002Fconcepts\u002Fcodecs\u002Fhuffman","20.concepts\u002Fcodecs\u002Fhuffman",{"title":49,"path":50,"stem":51},"Identity","\u002Fconcepts\u002Fcodecs\u002Fidentity","20.concepts\u002Fcodecs\u002Fidentity",{"title":53,"path":54,"stem":55},"Neural Predictor","\u002Fconcepts\u002Fcodecs\u002Fneural-predictor","20.concepts\u002Fcodecs\u002Fneural-predictor",{"title":57,"path":58,"stem":59},"Order-1 Arithmetic","\u002Fconcepts\u002Fcodecs\u002Forder1-arithmetic","20.concepts\u002Fcodecs\u002Forder1-arithmetic",{"title":61,"path":62,"stem":63},"Order-1 Scale AC","\u002Fconcepts\u002Fcodecs\u002Forder1-scale-ac","20.concepts\u002Fcodecs\u002Forder1-scale-ac",{"title":65,"path":66,"stem":67},"Per-Group Codebook","\u002Fconcepts\u002Fcodecs\u002Fper-group-codebook","20.concepts\u002Fcodecs\u002Fper-group-codebook",{"title":69,"path":70,"stem":71},"rANS","\u002Fconcepts\u002Fcodecs\u002Frans","20.concepts\u002Fcodecs\u002Frans",{"title":73,"path":74,"stem":75},"tANS","\u002Fconcepts\u002Fcodecs\u002Ftans","20.concepts\u002Fcodecs\u002Ftans",{"title":77,"path":78,"stem":79},"Zstd","\u002Fconcepts\u002Fcodecs\u002Fzstd","20.concepts\u002Fcodecs\u002Fzstd",{"title":81,"path":82,"stem":83},"Zstd Dictionary","\u002Fconcepts\u002Fcodecs\u002Fzstd-dict","20.concepts\u002Fcodecs\u002Fzstd-dict",{"title":85,"path":86,"stem":87},"Container format","\u002Fconcepts\u002Fcontainer","20.concepts\u002F5.container",{"title":89,"path":90,"stem":91},"Delta compression","\u002Fconcepts\u002Fdelta","20.concepts\u002F6.delta",{"title":93,"path":94,"stem":95},"Extensibility","\u002Fconcepts\u002Fextensibility","20.concepts\u002F7.extensibility",{"title":24,"path":25,"stem":97,"children":98},"20.concepts\u002Fcodecs\u002Findex",[99],{"title":24,"path":25,"stem":97},{"title":101,"path":102,"stem":103,"children":104},"Transforms","\u002Fconcepts\u002Ftransforms","20.concepts\u002Ftransforms\u002Findex",[105,106,110,114,118,122,126,130,134,140,144,148,152,156,160,164],{"title":101,"path":102,"stem":103},{"title":107,"path":108,"stem":109},"Alpha-Stable Normalize","\u002Fconcepts\u002Ftransforms\u002Falpha-stable-normalize","20.concepts\u002Ftransforms\u002Falpha-stable-normalize",{"title":111,"path":112,"stem":113},"Bit Reorder","\u002Fconcepts\u002Ftransforms\u002Fbit-reorder","20.concepts\u002Ftransforms\u002Fbit-reorder",{"title":115,"path":116,"stem":117},"Block Microscaling Repack","\u002Fconcepts\u002Ftransforms\u002Fblock-microscaling-repack","20.concepts\u002Ftransforms\u002Fblock-microscaling-repack",{"title":119,"path":120,"stem":121},"Burrows-Wheeler","\u002Fconcepts\u002Ftransforms\u002Fburrows-wheeler","20.concepts\u002Ftransforms\u002Fburrows-wheeler",{"title":123,"path":124,"stem":125},"Byte Split & Nibble Split","\u002Fconcepts\u002Ftransforms\u002Fbyte-split","20.concepts\u002Ftransforms\u002Fbyte-split",{"title":127,"path":128,"stem":129},"Concat","\u002Fconcepts\u002Ftransforms\u002Fconcat","20.concepts\u002Ftransforms\u002Fconcat",{"title":131,"path":132,"stem":133},"Delta","\u002Fconcepts\u002Ftransforms\u002Fdelta","20.concepts\u002Ftransforms\u002Fdelta",{"title":135,"path":136,"stem":137,"children":138},"Index Bitwidth Pack","\u002Fconcepts\u002Ftransforms\u002Findex-bitwidth-pack","20.concepts\u002Ftransforms\u002Findex-bitwidth-pack",[139],{"title":135,"path":136,"stem":137},{"title":141,"path":142,"stem":143},"IntDelta","\u002Fconcepts\u002Ftransforms\u002Fint-delta","20.concepts\u002Ftransforms\u002Fint-delta",{"title":145,"path":146,"stem":147},"Mantissa Zero Strip","\u002Fconcepts\u002Ftransforms\u002Fmantissa-zero-strip","20.concepts\u002Ftransforms\u002Fmantissa-zero-strip",{"title":149,"path":150,"stem":151},"Move to Front","\u002Fconcepts\u002Ftransforms\u002Fmove-to-front","20.concepts\u002Ftransforms\u002Fmove-to-front",{"title":153,"path":154,"stem":155},"MxFp4 Deinterleave","\u002Fconcepts\u002Ftransforms\u002Fmxfp4-deinterleave","20.concepts\u002Ftransforms\u002Fmxfp4-deinterleave",{"title":157,"path":158,"stem":159},"Predictor XOR","\u002Fconcepts\u002Ftransforms\u002Fpredictor-xor","20.concepts\u002Ftransforms\u002Fpredictor-xor",{"title":161,"path":162,"stem":163},"Reshape","\u002Fconcepts\u002Ftransforms\u002Freshape","20.concepts\u002Ftransforms\u002Freshape",{"title":165,"path":166,"stem":167},"Spherical Normalize","\u002Fconcepts\u002Ftransforms\u002Fspherical-normalize","20.concepts\u002Ftransforms\u002Fspherical-normalize",{"title":169,"path":170,"stem":171,"children":172},"Guides","\u002Fguides","30.guides\u002F00.index",[173,174,178,182,186,190,194,198,202],{"title":169,"path":170,"stem":171},{"title":175,"path":176,"stem":177},"CLI usage","\u002Fguides\u002Fcli","30.guides\u002F01.cli",{"title":179,"path":180,"stem":181},"Python API","\u002Fguides\u002Fpython-api","30.guides\u002F02.python-api",{"title":183,"path":184,"stem":185},"Writing your first extension","\u002Fguides\u002Fextension-authoring","30.guides\u002F03.extension-authoring",{"title":187,"path":188,"stem":189},"Trust and security","\u002Fguides\u002Ftrust-and-security","30.guides\u002F04.trust-and-security",{"title":191,"path":192,"stem":193},"Random access","\u002Fguides\u002Frandom-access","30.guides\u002F10.random-access",{"title":195,"path":196,"stem":197},"Tuning","\u002Fguides\u002Ftuning","30.guides\u002F11.tuning",{"title":199,"path":200,"stem":201},"Safetensors","\u002Fguides\u002Fsafetensors","30.guides\u002F50.safetensors",{"title":203,"path":204,"stem":205},"Transformers","\u002Fguides\u002Ftransformers","30.guides\u002F51.transformers",{"title":207,"path":208,"stem":209},"API reference","\u002Fapi","40.api",{"title":211,"path":212,"stem":213},"Benchmarks","\u002Fbenchmarks","50.benchmarks",{"title":215,"path":216,"stem":217},"Extensions","\u002Fextensions","60.extensions",{"title":219,"path":220,"stem":221},"Contributing","\u002Fcontributing","90.contributing",{"id":223,"title":219,"body":224,"description":607,"extension":608,"kind":609,"language":609,"links":609,"meta":610,"navigation":609,"path":220,"seo":611,"stem":221,"summary":609,"__hash__":612},"docs\u002F90.contributing.md",{"type":225,"value":226,"toc":600},"minimark",[227,231,236,286,290,307,371,386,390,398,448,462,501,515,519,549,564,568,593,596],[228,229,230],"p",{},"Thanks for your interest in contributing. PTWM is a Python + Rust (PyO3)\nlossless compression library; this guide covers the development setup,\nthe local checks to run before pushing, and the conventions for pull\nrequests.",[232,233,235],"h2",{"id":234},"reporting-issues","Reporting issues",[237,238,239,263,277],"ul",{},[240,241,242,246,247,253,254,258,259,262],"li",{},[243,244,245],"strong",{},"Bugs"," — open an issue at\n",[248,249,250],"a",{"href":250,"rel":251},"https:\u002F\u002Fgithub.com\u002Fkhwstolle\u002Fptwm\u002Fissues",[252],"nofollow"," with a minimal reproducer\n(Python code or ",[255,256,257],"code",{},"ptwm"," CLI invocation), the PTWM version\n(",[255,260,261],{},"python -c \"import ptwm; print(ptwm.__version__)\"","), the PyTorch\nversion, and the platform.",[240,264,265,268,269,272,273,276],{},[243,266,267],{},"Security vulnerabilities"," — do ",[243,270,271],{},"not"," open a public issue. See\n",[255,274,275],{},"SECURITY.md"," in the repository for the responsible-disclosure\ncontact.",[240,278,279,282,283,285],{},[243,280,281],{},"Patent concerns"," — report via the same ",[255,284,275],{}," contact.",[232,287,289],{"id":288},"development-setup","Development setup",[228,291,292,293,296,297,300,301,306],{},"The dev environment lives in ",[255,294,295],{},"pyproject.toml"," + ",[255,298,299],{},"uv.lock",", driven by\n",[248,302,305],{"href":303,"rel":304},"https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F",[252],"uv",". Nix is optional — a reproducible\nconvenience, not a requirement.",[308,309,314],"pre",{"className":310,"code":311,"language":312,"meta":313,"style":313},"language-bash shiki shiki-themes material-theme-lighter github-light github-dark","# With Nix\nnix develop\n\n# Without Nix\nuv sync --dev\nsource .venv\u002Fbin\u002Factivate\n","bash","",[255,315,316,325,336,343,349,361],{"__ignoreMap":313},[317,318,321],"span",{"class":319,"line":320},"line",1,[317,322,324],{"class":323},"sutJx","# With Nix\n",[317,326,328,332],{"class":319,"line":327},2,[317,329,331],{"class":330},"sbgvK","nix",[317,333,335],{"class":334},"s_sjI"," develop\n",[317,337,339],{"class":319,"line":338},3,[317,340,342],{"emptyLinePlaceholder":341},true,"\n",[317,344,346],{"class":319,"line":345},4,[317,347,348],{"class":323},"# Without Nix\n",[317,350,352,354,357],{"class":319,"line":351},5,[317,353,305],{"class":330},[317,355,356],{"class":334}," sync",[317,358,360],{"class":359},"stzsN"," --dev\n",[317,362,364,368],{"class":319,"line":363},6,[317,365,367],{"class":366},"sptTA","source",[317,369,370],{"class":334}," .venv\u002Fbin\u002Factivate\n",[228,372,373,374,377,378,381,382,385],{},"You need a working Rust toolchain (",[255,375,376],{},"rustc",", ",[255,379,380],{},"cargo",") — the build\ncompiles the ",[255,383,384],{},"ptwm._core"," native extension locally.",[232,387,389],{"id":388},"pre-commit-hooks","Pre-commit hooks",[228,391,392,397],{},[248,393,396],{"href":394,"rel":395},"https:\u002F\u002Fgithub.com\u002Fj178\u002Fprek",[252],"Prek"," manages the pre-commit hooks:",[308,399,401],{"className":310,"code":400,"language":312,"meta":313,"style":313},"uv tool install prek\nprek install                              # writes .git\u002Fhooks\u002Fpre-commit\nnix develop -c prek run --all-files       # run the whole hook set\n",[255,402,403,416,426],{"__ignoreMap":313},[317,404,405,407,410,413],{"class":319,"line":320},[317,406,305],{"class":330},[317,408,409],{"class":334}," tool",[317,411,412],{"class":334}," install",[317,414,415],{"class":334}," prek\n",[317,417,418,421,423],{"class":319,"line":327},[317,419,420],{"class":330},"prek",[317,422,412],{"class":334},[317,424,425],{"class":323},"                              # writes .git\u002Fhooks\u002Fpre-commit\n",[317,427,428,430,433,436,439,442,445],{"class":319,"line":338},[317,429,331],{"class":330},[317,431,432],{"class":334}," develop",[317,434,435],{"class":359}," -c",[317,437,438],{"class":334}," prek",[317,440,441],{"class":334}," run",[317,443,444],{"class":359}," --all-files",[317,446,447],{"class":323},"       # run the whole hook set\n",[228,449,450,451,377,454,457,458,461],{},"The hooks auto-fix what they can (",[255,452,453],{},"ruff check --fix",[255,455,456],{},"ruff format",",\n",[255,459,460],{},"cargo fmt",", hygiene hooks). If a hook rewrites files, the commit fails;\nre-stage and re-commit:",[308,463,465],{"className":310,"code":464,"language":312,"meta":313,"style":313},"git add -u && git commit -m '...'\n",[255,466,467],{"__ignoreMap":313},[317,468,469,472,475,478,482,485,488,491,495,498],{"class":319,"line":320},[317,470,471],{"class":330},"git",[317,473,474],{"class":334}," add",[317,476,477],{"class":359}," -u",[317,479,481],{"class":480},"sP7_E"," &&",[317,483,484],{"class":330}," git",[317,486,487],{"class":334}," commit",[317,489,490],{"class":359}," -m",[317,492,494],{"class":493},"sjJ54"," '",[317,496,497],{"class":334},"...",[317,499,500],{"class":493},"'\n",[228,502,503,510,511,514],{},[243,504,505,506,509],{},"Do not pass ",[255,507,508],{},"--no-verify","."," If a hook flags something the auto-fixer\ncan't fix (e.g. ",[255,512,513],{},"cargo clippy -D warnings","), fix the underlying issue\nand re-stage.",[232,516,518],{"id":517},"tests","Tests",[308,520,522],{"className":310,"code":521,"language":312,"meta":313,"style":313},"uv run pytest                # Python test suite\ncargo test --workspace       # Rust roundtrip + unit tests\n",[255,523,524,536],{"__ignoreMap":313},[317,525,526,528,530,533],{"class":319,"line":320},[317,527,305],{"class":330},[317,529,441],{"class":334},[317,531,532],{"class":334}," pytest",[317,534,535],{"class":323},"                # Python test suite\n",[317,537,538,540,543,546],{"class":319,"line":327},[317,539,380],{"class":330},[317,541,542],{"class":334}," test",[317,544,545],{"class":359}," --workspace",[317,547,548],{"class":323},"       # Rust roundtrip + unit tests\n",[228,550,551,552,555,556,559,560,563],{},"The Python suite enforces ",[255,553,554],{},"--doctest-modules"," and a coverage floor of\n75 %. The ",[255,557,558],{},"integration"," marker gates integration tests\n(",[255,561,562],{},"pytest -m integration",").",[232,565,567],{"id":566},"pull-requests","Pull requests",[237,569,570,573,576,579,586],{},[240,571,572],{},"Keep PRs focused — one concern per PR reviews and reverts cleanly.",[240,574,575],{},"Follow the existing code style. Don't introduce new abstractions or\ngeneric helpers unless the use case is concrete.",[240,577,578],{},"Add tests for new behaviour. Round-trip tests are the standard\ninvariant for any codec or transform change.",[240,580,581,582,585],{},"Update ",[255,583,584],{},"CHANGELOG.md"," under the unreleased section for any\nuser-visible change.",[240,587,588,589,592],{},"Don't commit secrets, ",[255,590,591],{},".env"," files, or large binary artifacts.",[228,594,595],{},"By contributing, you agree to license your contributions under the\nMIT License.",[597,598,599],"style",{},"html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .sbgvK, html code.shiki .sbgvK{--shiki-light:#E2931D;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .stzsN, html code.shiki .stzsN{--shiki-light:#91B859;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sptTA, html code.shiki .sptTA{--shiki-light:#6182B8;--shiki-default:#005CC5;--shiki-dark:#79B8FF}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 .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":313,"searchDepth":338,"depth":338,"links":601},[602,603,604,605,606],{"id":234,"depth":327,"text":235},{"id":288,"depth":327,"text":289},{"id":388,"depth":327,"text":389},{"id":517,"depth":327,"text":518},{"id":566,"depth":327,"text":567},"Development setup, pre-commit hooks, and PR conventions for PTWM.","md",null,{},{"title":219,"description":607},"LsxUcTqo7BZueDrYJiTDdgAEmR4liQIHDinDeeFJpEs",[614,609],{"title":215,"path":216,"stem":217,"description":615,"children":-1},"Add new codecs, transforms, classifiers, and more as signed bundles — without modifying PTWM core.",1784796352960]