{"_id":"@bitruvius/turbo-lerc","_rev":"19-6c9c7b593d096544a1cf52dd0c143d23","name":"@bitruvius/turbo-lerc","dist-tags":{"latest":"0.3.3"},"versions":{"0.3.0":{"name":"@bitruvius/turbo-lerc","version":"0.3.0","keywords":["bitruvius","geospatial","webgl2","lerc","raster","elevation","esri","wasm","decoder"],"license":"SEE LICENSE IN LICENSE","_id":"@bitruvius/turbo-lerc@0.3.0","maintainers":[{"name":"geoffhtaylor3d","email":"geoffhtaylor3d@gmail.com"},{"name":"danrhedges","email":"danrhedges@gmail.com"}],"homepage":"https://dev.bitruvius.com/sdks/js/","bugs":{"url":"https://github.com/bitruvius/support"},"dist":{"shasum":"2256ba4c32178a96ba1511106f75593589c86c93","tarball":"https://registry.npmjs.org/@bitruvius/turbo-lerc/-/turbo-lerc-0.3.0.tgz","fileCount":11,"integrity":"sha512-VPcqTzuGiYGyVf81vwtby6jWSWaKzl7CkruaA4i74838DkBYdlPDiZaHUe7aAykRqSLOsuJU7MuQCf7kJf9skA==","signatures":[{"sig":"MEUCIQCxUJJPQlcznxNdkq9PK5SFbNGkk64su9/Xz6Idu+cFNgIgaJhOVPXQ/B2+OVapFKj4kIlpnjnVOqlkNnsbyNfV1sY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":172738},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"2256ba4c32178a96ba1511106f75593589c86c93","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./wasm/*":"./wasm/*","./package.json":"./package.json"},"scripts":{"test":"bun test","build":"bun build ./src/index.ts --outdir dist --format esm --target browser --minify --external '@bitruvius/*' --define __dirname='\"\"' --define __filename='\"\"' && tsc --emitDeclarationOnly","build:wasm":"bun run scripts/build-wasm.ts"},"_npmUser":{"name":"geoffhtaylor3d","email":"geoffhtaylor3d@gmail.com"},"_integrity":"sha512-VPcqTzuGiYGyVf81vwtby6jWSWaKzl7CkruaA4i74838DkBYdlPDiZaHUe7aAykRqSLOsuJU7MuQCf7kJf9skA==","_npmVersion":"10.8.3","description":"TurboLERC: fast LERC raster decoder for the browser, pure-Rust wasm","directories":{},"sideEffects":["./src/index.ts"],"_nodeVersion":"24.3.0","dependencies":{"@bitruvius/foundation":"^0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/turbo-lerc_0.3.0_1785722134966_0.17418342070343984","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@bitruvius/turbo-lerc","version":"0.3.1","keywords":["bitruvius","geospatial","webgl2","lerc","raster","elevation","esri","wasm","decoder"],"license":"SEE LICENSE IN LICENSE","_id":"@bitruvius/turbo-lerc@0.3.1","maintainers":[{"name":"geoffhtaylor3d","email":"geoffhtaylor3d@gmail.com"},{"name":"danrhedges","email":"danrhedges@gmail.com"}],"homepage":"https://dev.bitruvius.com/sdks/js/","bugs":{"url":"https://github.com/bitruvius/support"},"dist":{"shasum":"d1478db98926632c7aefabeeebb0cd512dc1d628","tarball":"https://registry.npmjs.org/@bitruvius/turbo-lerc/-/turbo-lerc-0.3.1.tgz","fileCount":11,"integrity":"sha512-a5GB5hBN9WHl0dwaMdPzeKsdugv7aNDOxPBhmvCjTlqzANTAMkDsWp5ZCwTDjaC29Qxm/3st6BzMnlJZTZAlrA==","signatures":[{"sig":"MEYCIQCq+BVNNlyJj6i+eICUflwp83E5bC36lofKkJO/TezlWgIhAOB5wj0yFRzUJeKBa+WeCmsrFvN70yPJLzalNLQLRDj+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":172916},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"d1478db98926632c7aefabeeebb0cd512dc1d628","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./wasm/*":"./wasm/*","./package.json":"./package.json"},"scripts":{"test":"bun test","build":"bun build ./src/index.ts --outdir dist --format esm --target browser --minify --external '@bitruvius/*' --define __dirname='\"\"' --define __filename='\"\"' && tsc --emitDeclarationOnly","build:wasm":"bun run scripts/build-wasm.ts"},"_npmUser":{"name":"geoffhtaylor3d","email":"geoffhtaylor3d@gmail.com"},"_integrity":"sha512-a5GB5hBN9WHl0dwaMdPzeKsdugv7aNDOxPBhmvCjTlqzANTAMkDsWp5ZCwTDjaC29Qxm/3st6BzMnlJZTZAlrA==","_npmVersion":"10.8.3","description":"TurboLERC: fast LERC raster decoder for the browser, pure-Rust wasm","directories":{},"sideEffects":["./src/index.ts"],"_nodeVersion":"24.3.0","dependencies":{"@bitruvius/foundation":"^0.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/turbo-lerc_0.3.1_1785725514398_0.9416799659185875","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@bitruvius/turbo-lerc","version":"0.3.2","keywords":["bitruvius","geospatial","webgl2","lerc","raster","elevation","esri","wasm","decoder"],"license":"SEE LICENSE IN LICENSE","_id":"@bitruvius/turbo-lerc@0.3.2","maintainers":[{"name":"geoffhtaylor3d","email":"geoffhtaylor3d@gmail.com"},{"name":"danrhedges","email":"danrhedges@gmail.com"}],"homepage":"https://dev.bitruvius.com/sdks/js/","bugs":{"url":"https://github.com/bitruvius/support"},"dist":{"shasum":"da31851cb5972c740d3fd5bec40afd67eb9c2581","tarball":"https://registry.npmjs.org/@bitruvius/turbo-lerc/-/turbo-lerc-0.3.2.tgz","fileCount":11,"integrity":"sha512-9HNAt5jEVrcenHwxv3nEGG2TF2p/vE33574PGybGdiNNQ1iE/GJl71+uMGmdEYF8EsoiiJLnz9NHBgrnpw3EFA==","signatures":[{"sig":"MEQCIA2cBkUxBClicT6O7DKQ1SO+oLVtCBgulYFUWZNTKAMmAiBDn7sBmOczZe7040FVHTmbO65k6SGGnc5mqJJe2ZhvSA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":172916},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"da31851cb5972c740d3fd5bec40afd67eb9c2581","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./wasm/*":"./wasm/*","./package.json":"./package.json"},"scripts":{"test":"bun test","build":"bun build ./src/index.ts --outdir dist --format esm --target browser --minify --external '@bitruvius/*' --define __dirname='\"\"' --define __filename='\"\"' && tsc --emitDeclarationOnly","build:wasm":"bun run scripts/build-wasm.ts"},"_npmUser":{"name":"geoffhtaylor3d","email":"geoffhtaylor3d@gmail.com"},"_integrity":"sha512-9HNAt5jEVrcenHwxv3nEGG2TF2p/vE33574PGybGdiNNQ1iE/GJl71+uMGmdEYF8EsoiiJLnz9NHBgrnpw3EFA==","_npmVersion":"10.8.3","description":"TurboLERC: fast LERC raster decoder for the browser, pure-Rust wasm","directories":{},"sideEffects":["./src/index.ts"],"_nodeVersion":"24.3.0","dependencies":{"@bitruvius/foundation":"^0.3.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/turbo-lerc_0.3.2_1785952483060_0.5564047883210639","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"_id":"@bitruvius/turbo-lerc@0.3.3","bugs":{"url":"https://github.com/bitruvius/support"},"dist":{"shasum":"caaa7c36e9f9472fb0def4b98df7b58b41054f41","tarball":"https://registry.npmjs.org/@bitruvius/turbo-lerc/-/turbo-lerc-0.3.3.tgz","fileCount":11,"integrity":"sha512-B+SOUxNiiatsKf8XzwWfOtpEKHLwUaF4eVG2ctvJxrhIsJ85As0CkgaQw+gHdvjCTHntm7fgLIs8mK3+YqFc7g==","signatures":[{"sig":"MEUCIQDDKRDsaiiWf/j52dxtZuJEMj0bZcPMH0dYRahC+gT4PwIgdJUd+Q3nStI9tRLPR938j0m0OuKf99qvOLOdzlUPe1A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD2PXmH++dG4S2aPT/C9y7b9wAziVCDNL0/PFEqljZ+SQIgRYCye63atVFr243Yl7wuoXgl4wACH59uN/HRKMwl1/c="}],"unpackedSize":186045},"main":"./dist/index.js","name":"@bitruvius/turbo-lerc","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"caaa7c36e9f9472fb0def4b98df7b58b41054f41","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./wasm/*":"./wasm/*","./package.json":"./package.json"},"license":"SEE LICENSE IN LICENSE","scripts":{"test":"bun test","build":"bun build ./src/index.ts --outdir dist --format esm --target browser --minify --external '@bitruvius/*' --define __dirname='\"\"' --define __filename='\"\"' && tsc --emitDeclarationOnly","build:wasm":"bun run scripts/build-wasm.ts"},"version":"0.3.3","_npmUser":{"name":"geoffhtaylor3d","email":"geoffhtaylor3d@gmail.com"},"homepage":"https://dev.bitruvius.com/sdks/js/","keywords":["bitruvius","geospatial","webgl2","lerc","raster","elevation","esri","wasm","decoder"],"_integrity":"sha512-B+SOUxNiiatsKf8XzwWfOtpEKHLwUaF4eVG2ctvJxrhIsJ85As0CkgaQw+gHdvjCTHntm7fgLIs8mK3+YqFc7g==","_npmVersion":"10.8.3","description":"TurboLERC: fast LERC raster decoder for the browser, pure-Rust wasm","directories":{},"maintainers":[{"name":"geoffhtaylor3d","email":"geoffhtaylor3d@gmail.com"},{"name":"danrhedges","email":"danrhedges@gmail.com"}],"sideEffects":["./src/index.ts"],"_nodeVersion":"24.3.0","dependencies":{"@bitruvius/foundation":"^0.3.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/turbo-lerc_0.3.3_1790299976475_0.8287526825682519"}}},"time":{"created":"2026-08-03T01:55:34.795Z","modified":"2026-09-25T01:32:56.723Z","0.2.0-alpha.0":"2026-06-12T04:19:53.162Z","0.2.0-alpha.1":"2026-06-12T13:08:19.555Z","0.2.0-alpha.2":"2026-06-12T14:54:59.003Z","0.2.0-alpha.3":"2026-06-17T04:39:32.813Z","0.2.0-alpha.4":"2026-06-18T01:20:32.408Z","0.3.0":"2026-08-03T01:55:35.107Z","0.3.1":"2026-08-03T02:51:54.540Z","0.3.2":"2026-08-05T17:54:43.193Z","0.3.3":"2026-09-25T01:32:56.567Z"},"bugs":{"url":"https://github.com/bitruvius/support"},"license":"SEE LICENSE IN LICENSE","homepage":"https://dev.bitruvius.com/sdks/js/","keywords":["bitruvius","geospatial","webgl2","lerc","raster","elevation","esri","wasm","decoder"],"description":"TurboLERC: fast LERC raster decoder for the browser, pure-Rust wasm","maintainers":[{"name":"geoffhtaylor3d","email":"geoffhtaylor3d@gmail.com"},{"name":"danrhedges","email":"danrhedges@gmail.com"}],"readme":"<p align=\"center\">\n  <a href=\"https://bitruvius.com\"><img src=\"https://cdn.bitruvius.com/brand/bitruvius-logo.png\" width=\"360\" alt=\"Bitruvius\"></a>\n</p>\n\n# @bitruvius/turbo-lerc\n\n**Same LERC wire format. Much faster decode.**\n\nA SIMD-optimized LERC decoder for the browser, byte-for-byte compatible with the\nLERC reference. Point it at the tiles you already serve, get the same values\nout, sooner.\n\n> **Turbocharged by [Bitruvius TurboLERC](https://bitruvius.com/turbolerc).**\n\n## Why it is faster\n\nHand-written SIMD across every backend: AVX2 on x86_64, NEON on Apple Silicon and\nGraviton, and WASM SIMD128 in the browser running at 60–107% of native throughput.\nNo emscripten, no JavaScript fallback path doing the real work.\n\nDecode speedup against the LERC reference, by corpus:\n\n| Corpus | Decode |\n|---|---|\n| Hyperspectral | 1.9× |\n| Multispectral | 1.9× |\n| SAR Video | 1.8× |\n| SAR Complex | 1.8× |\n| Optical | 1.5× |\n| Lidar Intensity | 1.4× |\n| LiDAR DSM | 1.4× |\n| Terrain Aspect | 1.3× |\n\nThat is the full published chart, not the top of it. Each figure is the median\nacross the matched corpus, as published on\n[bitruvius.com/turbolerc](https://bitruvius.com/turbolerc). These are our own\nmeasurements under that methodology; results vary by workload and hardware, so\nbenchmark your own tiles before you count on a number.\n\nCompression is untouched, because the bytes are untouched. On a lidar DEM (f32),\nTurboLERC and the reference both land at a 2.58× compression ratio. Same\ncompression bar, different speed bar.\n\n## Use it\n\n```ts\nimport { LercDecoder } from '@bitruvius/turbo-lerc';\n\nconst bytes = new Uint8Array(await (await fetch(TILE_URL)).arrayBuffer());\nconst raster = await new LercDecoder().decode(bytes);\n\nraster.width;   // 1024\nraster.zMin;    // real min, straight from the header, no manual scan\nraster.zMax;    // real max\nraster.values;  // Float32Array, row-major, first band\nraster.mask;    // Uint8Array, 1 valid / 0 nodata, when the raster has holes\n```\n\nThat is the whole API for the common case. Integer, float and double sources all\nnormalize to `Float32Array`, the natural target for elevation and coverage\nrendering, so your render path stops caring what the publisher chose.\n\n`lercDataTypeName(raster.dataType)` gives you the source type as a string if you\ndo care. Call `decoder.dispose()` when a layer tears down to hand back the wasm\nheap.\n\n## What ships\n\n```sh\nnpm i @bitruvius/turbo-lerc\n```\n\n**Decoder only, and free.** This package is the TurboLERC decoder. Production\nencoding is a separate commercial license through the Bitruvius Developer Hub.\nNothing here encodes LERC, so do not plan a write path around it.\n\n**LERC1 and LERC2.** Legacy v1 (CntZImage) blobs decode transparently, same call.\n\n**First band, single depth.** v1 covers the headline DEM and coverage case.\nMulti-band RGB rasters are a follow-up, not supported yet.\n\n**No build tax.** The pure-Rust wasm is committed to the package, so consumers\nbuild with only Bun. A self-contained ESM bundle is also published on the\nBitruvius CDN if you would rather skip the bundler. Browsers need\n`script-src 'wasm-unsafe-eval'` in CSP.\n\nDecode is golden-tested against real Esri-produced rasters: a LERC2 float DEM and\ntwo legacy v1 Terrain3D tiles, including a known-bad-tile regression. Rendering\n(colormap raster, hillshade, terrain mesh) is a separate, viewer-specific\nconcern: see `@bitruvius/sdk-maplibre` for georeferenced terrain.\n\n## Learn more\n\n- **[Live examples](https://dev.bitruvius.com/bitruvius-sdk-js/examples/)**: running, with source\n- **[Documentation](https://dev.bitruvius.com/sdks/js/)**: guides and the full API reference\n- **[Support](https://github.com/bitruvius/support)**: questions and issues\n- **[TurboLERC on bitruvius.com](https://bitruvius.com/turbolerc)**: benchmarks and format details\n\n## Trademarks\n\nEsri, ArcGIS, and LERC are trademarks of Environmental Systems Research\nInstitute, Inc. Apple and Apple Silicon are trademarks of Apple Inc. Intel is a\ntrademark of Intel Corporation. All other marks are the property of their\nrespective owners.\n\nThese names are used solely to identify the data formats this software\ninteroperates with. Bitruvius is not affiliated with, sponsored by, or endorsed by\nany of them, and no such relationship is implied.\n\nTurboLERC is an independent implementation of the openly published LERC format.\nCompatibility claims, including byte-for-byte output, describe interoperability\nwith that format as verified by our test suites. LERC is published by Esri under\nthe Apache 2.0 license.\n\n## License\n\nProprietary. The full terms ship as `LICENSE` inside this package, and are readable\nbefore installing at [cdn.bitruvius.com/legal/sdk-license-v1.txt](https://cdn.bitruvius.com/legal/sdk-license-v1.txt).\n\n© Bitruvius, Inc.\n","readmeFilename":"README.md"}