Skip to content

LGSInnovations/sigfile

Repository files navigation

SigFile

License Build Status PRs Welcome npm version codecov

SigFile provides MATLAB file parsing and XMIDAS Bluefile parsing in JS.

Installation

npm i sigfile

or

yarn add sigfile

Example

Extracting the header from a Bluefile

const bluefile = require('sigfile').bluefile;
const fs = require('fs');

fs.readFile('./tests/dat/ramp.tmp', function(err, buf) {
    const header = new sigfile.BlueHeader(buf.buffer);
    console.log(header);
});

or

import { readFile } from 'fs';
import { bluefile } from 'sigfile';

readFile('./tests/dat/ramp.tmp', (err, buf) => {
    const header = new bluefile.BlueHeader(buf.buffer);
    console.log(header);
});