Byte-exact Esri LEPCC decode in the browser, at SIMD speed.
TurboLEPCC is a memory-safe, SIMD-first encoder and decoder for LEPCC (Esri
Limited Error Point Cloud Compression), written in Rust with no unsafe. It
holds byte-exact parity with Esri's C++ reference on every test case. This
package is the browser build: the decoder alone, compiled to WebAssembly, with
no emscripten anywhere in the chain.
Turbocharged by Bitruvius TurboLEPCC.
Bitruvius publishes TurboLEPCC's benchmarks against Esri's liblepcc. Every
decode kernel it reports, measured on the native SIMD backends:
| Decode kernel | Windows AVX2 | macOS NEON |
|---|---|---|
| Point geometry (XYZ) | 2.27× (2.17×–2.36×) | 1.80× (1.70×–1.89×) |
| LiDAR intensity | 2.28× (2.01×–2.55×) | 3.33× (2.56×–4.10×) |
| Per-point color (RGB) | 0.97× | 1.27× |
Color decode is the one that does not beat the reference on AVX2, and it is published without a range. Across the full kernel set, TurboLEPCC wins 10 of 12 on Windows AVX2, where the two exceptions tie within 4%, and 11 of 13 on macOS NEON. Against the only other memory-safe LEPCC port it is 34× to 60× faster.
Those are the published AVX2 and NEON figures. This package ships the same Rust decoder compiled to the WASM SIMD128 backend, which is not part of that published benchmark set. What does carry over unchanged is the parity: the bytes you get back match the reference decoder.
import { LepccDecoder } from '@bitruvius/turbo-lepcc';
const decoder = new LepccDecoder();
const blob = new Uint8Array(await (await fetch('xyz.lepcc')).arrayBuffer());
const xyz = await decoder.decodeXyz(blob); // Float64Array, x/y/z interleaved (3·N)
Every method takes the raw Uint8Array of one blob, not a DOM Blob.
LEPCC stores each attribute as its own self-describing blob, so there is no
single decode(). Decode the one you hold, or identify an unknown blob first:
await decoder.blobType(blob); // 'xyz' | 'rgb' | 'intensity' | 'flagBytes'
await decoder.decodeRgb(blob); // Uint8Array, r/g/b interleaved (3·N)
await decoder.decodeIntensity(blob); // Uint16Array, one value per point
await decoder.decodeFlagBytes(blob); // Uint8Array, one LAS flag byte per point
Holding a whole .lepcc (LPC1-framed) container rather than one loose attribute
blob? LepccContainerDecoder unpacks it and yields a quantized point tile
through the SDK's streaming Decoder contract.
Streaming a native I3S point cloud service instead of loose blobs?
LepccI3sPointCloudDecoder and its worker variant are the decode seam that
@bitruvius/i3s and the MapLibre I3S point cloud layer already use, so you get
this decoder there without wiring it up.
npm i @bitruvius/turbo-lepcc
Decode only. The encoder is not in the .wasm and is not part of this
package. Encoding lives in the native TurboLEPCC library, published on
bitruvius.com as a drop-in for Esri liblepcc and currently listed as coming
soon.
No peer dependencies. The wasm is vendored and committed, and it resolves next to your bundle automatically. In a Web Worker, in Node or Bun, or against a cross-origin CDN copy, hand it the bytes instead:
const decoder = new LepccDecoder({ wasmInit: { wasmBytes } });
Your CSP needs script-src 'wasm-unsafe-eval'. A self-contained ESM bundle is
also on the Bitruvius CDN if you would rather skip the bundler.
Esri, ArcGIS, I3S and LEPCC are trademarks of Environmental Systems Research Institute, Inc. MapLibre is a trademark of the MapLibre organization. All other marks are the property of their respective owners.
These names are used solely to describe the data formats this software interoperates with. Bitruvius is not affiliated with, sponsored by, or endorsed by any of them, and no such relationship is implied.
TurboLEPCC is an independent implementation of the openly published LEPCC
format, developed by Bitruvius and verified against Esri's liblepcc reference,
which Esri releases under the Apache 2.0 license. It is neither produced nor
endorsed by Esri, and byte-exact parity is a measured property of our test
corpus rather than any form of certification.
Proprietary. The full terms ship as LICENSE inside this package, and are readable
before installing at cdn.bitruvius.com/legal/sdk-license-v1.txt.
© Bitruvius, Inc.
Browser LEPCC (Esri Limited Error Point Cloud Compression) point-cloud decode, backed by a pure-Rust wasm decoder.
Remarks
Use LepccDecoder to decode standalone LEPCC attribute blobs, LepccContainerDecoder to adapt a standalone
.lepcc(LPC1) container to the SDK's streamingDecodercontract, or inject LepccI3sPointCloudDecoder / WorkerLepccI3sPointCloudDecoder as the decode seam for native Esri I3S point-cloud services (via the@bitruvius/i3sengine or the@bitruvius/sdk-maplibreI3S point-cloud layer). Decode-only.