Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

kaitai-struct-loader

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kaitai-struct-loader

This [webpack loader](https://webpack.js.org/concepts/loaders/) adds support for [Kaitai Struct](https://kaitai.io) .ksy definitions.

latest
npmnpm
Version
0.9.0
Version published
Maintainers
4
Created
Source

Kaitai Struct loader for webpack

This webpack loader adds support for Kaitai Struct .ksy definitions.

Installation

yarn add --dev kaitai-struct-loader

Usage

file.js

import KaitaiStream from 'kaitai-struct/KaitaiStream';
import DoomWAD from './game/doom_wad.ksy';

const stream = new KaitaiStream(arrayBuffer);
const data = new DoomWAD(stream);

The specification of the Doom .wad format can be found in the format gallery.

webpack.config.js

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

Options

NameTypeDefaultDescription
debug{boolean}falseCompile .ksy files in --debug mode
(see #332 for more info)

Keywords

kaitai

FAQs

Package last updated on 17 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts