Socket
Socket
Sign inDemoInstall

robust-compress

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    robust-compress

Compress a robust sequence


Version published
Weekly downloads
84K
increased by12.57%
Maintainers
1
Install size
5.21 kB
Created
Weekly downloads
 

Readme

Source

robust-compress

Quickly compress a non-overlapping increasing sequence. This does not normalize the sequence, but can be useful in some situations. Based on the algorithm in:

Jonathan Shewchuk, "Adaptive precision floating-point arithmetic and fast robust predicates for computational geometry"

Example

var compress = require("robust-compress")

var seq = [1, 2]

compress(seq)

console.log(seq)

Output:

[ 3 ]

Install

npm install robust-compress

API

require("robust-compress")(seq)

Approximately compress a non-overlapping increasing floating point expansion in place.

  • seq is a robust sequence

Returns seq

Note This method updates seq in place

Credits

(c) 2014 Mikola Lysenko. MIT License

Keywords

FAQs

Last updated on 06 May 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc