Build from source¶
Most users don't need this — npm install mscompress downloads a
prebuilt binary. Source builds are needed for unsupported platforms,
debugging, or when contributing.
Prerequisites¶
- Node.js ≥ 16
- Python 3 (for
node-gyp/cmake-js) - C/C++17 toolchain
- macOS: Xcode Command Line Tools
- Linux:
gcc/clang+make - Windows: Visual Studio Build Tools 2022+
- CMake ≥ 3.15
Build¶
This runs:
prebuild-install -r napi(postinstall) — try to fetch a prebuilt binary.npm run build—tsc && tsc-alias.
If the prebuild fetch fails, cmake-js is invoked automatically.
Debug build¶
Produces a binary with debug symbols and -O0. Use before attaching a
debugger.
Run tests¶
Tests are in test/ and pull fixtures from the repo-root test/data/.
TypeScript reference autogen¶
To generate a typedoc-style API reference into docs/node/reference/:
npx typedoc --plugin typedoc-plugin-markdown \
--out ../docs/node/reference/generated \
src/index.ts
This isn't wired into the current docs build — it's a planned addition. See the reference index.