ya-struct

Yet Another Node.js Structure API

Usage no npm install needed!

<script type="module">
  import yaStruct from 'https://cdn.skypack.dev/ya-struct';
</script>

README

node-ya-struct

Yet Another Node.js Structure API

About

This module allows you to parse and format fixed C-like data structures. Mainly this can be used for native code interoperability, network communication or file formats. The goal is to support types and alignments similar to C structures with support for endianness.

API

TBD

Features

  • Basic Integer type support
  • Buffer referencing - buffers can be used as pointers, including garbage collection protection
  • Endianness support

Planned Features

  • Nested structures
  • Nested arrays
  • C strings as arrays
  • C strings as pointers
  • Basic C types
  • Bitfields
  • Unions
  • Field alignments