1.0.1 • Published 8 years ago

ecm v1.0.1

Weekly downloads
3
License
GPL-2.0
Repository
github
Last release
8 years ago

ECM encode utility for Node.js

travis build Coverage Status NPM Version

This project is a port of the ECM encode utility from ECM.

Installation

npm install ecm --save

Usage

var ecm = require('ecm')

var handler = ecm('Metal Slug X.img');

handler.on('error', function (data) {
  console.log(data);
});

handler.on('progress', function (data) {
  console.log(data);
});

handler.on('complete', function (data) {
  console.log(data);
});

ecm(source, destination)

Either the source or the destination has to be provided. Note: a source file can't ends with .ecm, the destination must ends with .ecm

The ECM format allows you to reduce the size of a typical CD image file (BIN, CDI, NRG, CCD, or any other format that uses raw sectors; results may vary).

Parameters:

source - string - The source file. If not provided, the destination path minus the .ecm will be used. destination - string - The destination file. If not provided, the source path plus the .ecm will be used.

Returns:

EventEmitter

Events

progress

Emitted during the encoding

parameter: data

data.analyse - Number - 0..100 - Progression of the analysis data.encoding - Number - 0..100 - Progression of the encoding

error

Emitted when an error has occurred

parameter: data

data.error - String - Label of the error

complete

Emitted when encoding is finished

parameter: data

data.inLength - Number - Source length data.outLength - Number - Destination length data.literal - Number - Literal bytes data.m1s - Number - Mode 1 sectors data.m2f1 - Number - Mode 2 form 1 sectors data.m2f2 - Number - Mode 2 form 2 sectors

License

GPL-2.0