Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

lerc

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lerc

Rapid decoding of Lerc compressed raster data for any standard pixel type.


Version published
Weekly downloads
249K
decreased by-15.67%
Maintainers
3
Weekly downloads
 
Created

What is lerc?

The 'lerc' npm package is used for encoding and decoding LERC (Limited Error Raster Compression) files. LERC is a format developed by Esri for compressing raster data with controlled loss, making it suitable for geospatial applications where precision is important.

What are lerc's main functionalities?

Decode LERC data

This feature allows you to decode LERC data from a file. The decoded data can then be used for further processing or analysis.

const lerc = require('lerc');
const fs = require('fs');

// Read LERC file
const lercData = fs.readFileSync('path/to/lerc/file.lerc');

// Decode LERC data
const decodedData = lerc.decode(lercData);
console.log(decodedData);

Encode data to LERC format

This feature allows you to encode raster data into the LERC format. The encoded data can then be saved to a file for storage or transmission.

const lerc = require('lerc');
const fs = require('fs');

// Example data to encode
const data = {
  width: 256,
  height: 256,
  pixels: new Float32Array(256 * 256)
};

// Encode data to LERC format
const encodedData = lerc.encode(data);

// Write encoded data to file
fs.writeFileSync('path/to/output/file.lerc', encodedData);

Other packages similar to lerc

FAQs

Package last updated on 30 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc