New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@confuzzle/burrows-wheeler

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@confuzzle/burrows-wheeler

naive Burrows-Wheeler transform

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@confuzzle/burrows-wheeler

This package contains a naive, inefficient implementation of the Burrows-Wheeler transform, which only works for input sizes of less than 64KiB.

For details for how this can be used together with the Move-to-front transform to improve compression, see this excellent blog post by Tommy Reddad. Another resource that may be useful is this previous assignment set for the COS226 course at Princeton in 2003.

See also

Functionality

This package provides two functions:

  • forward(s), which runs Buffer.from(s) and performs the forward transform on the result
  • inverse(x), which runs Buffer.from(x) performs the inverse transform on the result Both functions return a Buffer object.

Example Usage

const bwt = require('@confuzzle/burrows-wheeler');
const s = 'abracadabra';
const t = bwt.forward(s);
const inv = bwt.inverse(t).toString();
console.log(inv) // abracadabra

Keywords

FAQs

Package last updated on 31 Jan 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