/libhrc

Human-Readable Compression

Primary LanguageJavaScriptMIT LicenseMIT

libhrc

Human-Readable Compression

Build Status

var libhrc = require('libhrc');
var s = "Yolo Baggins Yolo Baggins Yolo Baggins Baggins Baggins Baggins Baggins Baggins";
console.log(libhrc.greedy_compress(s, ' ', true, ' x', '<', '>'));

Demo

Installation

$ npm install libhrc

Features

  • finds repeated words, not subsequence of characters.
  • use tagging to stylize repeats (e.g. for HTML/CSS)

Philosophy

Reduce sentence length by finding repeated words/sequence of words. Make output easily decoded by a human reader.

Tests

npm test

License

MIT