Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

kaitai-struct-loader

0.1.2 • Public • Published

Kaitai-Struct loader for webpack

This loader adds support for kaitai-struct .ksy definitions

Installation (not published yet)

yarn add --dev kaitai-struct-loader

Usage

file.js

import KaitaiStream form 'kaitai-struct/KaitaiStream';
import DoomWAD from './game/doom_wad.ksy';
 
const stream = new KaitaiStream(arrayBuffer);
const data = new DoomWAD(stream);

A specification of the Doom wad format can be found at the format gallery.

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.ksy$/,
        loader: 'kaitai-struct-loader'
      }
    ]
  }
}

Install

npm i kaitai-struct-loader

DownloadsWeekly Downloads

0

Version

0.1.2

License

MIT

Last publish

Collaborators

  • avatar
  • avatar
  • avatar