1.6.0 • Published 25 days ago

hca-decoder v1.6.0

Weekly downloads
16
License
MIT
Repository
github
Last release
25 days ago

node-hca-decoder

Build status

HCA decoder based on Nyagamon/HCADecoder

Usage

const { HCADecoder } = require('hca-decoder')
const hca = new HCADecoder(/* ciphKey1, ciphKey2 */)
const hcaInput = 'path/to/somefile.hca'
// or 
// const hcaInput = fs.readFileSync('path/to/somefile.hca')

hca.decodeToWaveFile(hcaInput/* , filenameWAV, volume, mode, loop, (err, wavFilePath) => {} */)
// => undefined (Async)

hca.decodeToWaveFileSync(hcaInput/* , filenameWAV, volume, mode, loop */)
// => boolean

hca.decodeToMemory(hcaInput/* , volume, mode, loop, (err, buffer) => {} */)
// => undefined (Async)

hca.decodeToMemorySync(hcaInput/* , volume, mode, loop */)
// => Buffer

hca.printInfo(hcaInput)
// => undefined

HCADecoder.getInfo(hcaInput)
// => HCAInfo

Test

# install node-gyp (5+)
$ npm install -g node-gyp

# tell npm use global node-gyp
$ npm config set node_gyp "`npm prefix -g`/lib/node_modules/node-gyp/bin/node-gyp.js"

# for Windows
# > for /f "delims=" %P in ('npm prefix -g') do npm config set node_gyp "%P\node_modules\node-gyp\bin\node-gyp.js"

# install node C++ header
$ node-gyp install # --target=<node version>

$ npm install # --no-package-lock

$ npm test

License

  • MIT
1.6.0

25 days ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.2

3 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago