{"id":13520419,"url":"https://github.com/keichi/binary-parser","last_synced_at":"2025-05-14T21:05:00.791Z","repository":{"id":11578612,"uuid":"14067777","full_name":"keichi/binary-parser","owner":"keichi","description":"A blazing-fast declarative parser builder for binary data","archived":false,"fork":false,"pushed_at":"2024-05-03T07:11:21.000Z","size":1372,"stargazers_count":896,"open_issues_count":56,"forks_count":139,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-05-11T12:01:56.400Z","etag":null,"topics":["binary","binary-parser","buffer","javascript","nodejs","parser","parser-builder","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keichi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-11-02T14:49:35.000Z","updated_at":"2025-05-09T08:48:39.000Z","dependencies_parsed_at":"2024-01-14T04:44:11.612Z","dependency_job_id":"759b2120-8482-4f33-9972-90ef7e74f775","html_url":"https://github.com/keichi/binary-parser","commit_stats":{"total_commits":375,"total_committers":32,"mean_commits":11.71875,"dds":"0.30933333333333335","last_synced_commit":"c51a131069b935e5bbb0ba08a2305cb644be613f"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keichi%2Fbinary-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keichi%2Fbinary-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keichi%2Fbinary-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keichi%2Fbinary-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keichi","download_url":"https://codeload.github.com/keichi/binary-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254227611,"owners_count":22035669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary","binary-parser","buffer","javascript","nodejs","parser","parser-builder","typescript"],"created_at":"2024-08-01T05:02:20.140Z","updated_at":"2025-05-14T21:05:00.733Z","avatar_url":"https://github.com/keichi.png","language":"TypeScript","readme":"# Binary-parser\n\n[![build](https://github.com/keichi/binary-parser/workflows/build/badge.svg)](https://github.com/keichi/binary-parser/actions?query=workflow%3Abuild)\n[![npm](https://img.shields.io/npm/v/binary-parser)](https://www.npmjs.com/package/binary-parser)\n[![license](https://img.shields.io/github/license/keichi/binary-parser)](https://github.com/keichi/binary-parser/blob/master/LICENSE)\n\nBinary-parser is a parser builder for JavaScript that enables you to write\nefficient binary parsers in a simple and declarative manner.\n\nIt supports all common data types required to analyze a structured binary\ndata. Binary-parser dynamically generates and compiles the parser code\non-the-fly, which runs as fast as a hand-written parser (which takes much more\ntime and effort to write). Supported data types are:\n\n- [Integers](#uint8-16-32-64le-bename-options) (8, 16, 32 and 64 bit signed\n  and unsigned integers)\n- [Floating point numbers](#float-doublele-bename-options) (32 and 64 bit\n  floating point values)\n- [Bit fields](#bit1-32name-options) (bit fields with length from 1 to 32\n  bits)\n- [Strings](#stringname-options) (fixed-length, variable-length and zero\n  terminated strings with various encodings)\n- [Arrays](#arrayname-options) (fixed-length and variable-length arrays of\n  builtin or user-defined element types)\n- [Choices](#choicename-options) (supports integer keys)\n- [Pointers](#pointername-options)\n- User defined types (arbitrary combination of builtin types)\n\nBinary-parser was inspired by [BinData](https://github.com/dmendel/bindata)\nand [binary](https://github.com/substack/node-binary).\n\n## Quick Start\n\n1. Create an empty `Parser` object with `new Parser()` or `Parser.start()`.\n2. Chain methods to build your desired parser. (See [API](#api) for detailed\n   documentation of each method)\n3. Call `Parser.prototype.parse` with a `Buffer`/`Uint8Array` object passed as\n   its only argument.\n4. The parsed result will be returned as an object.\n   - If parsing failed, an exception will be thrown.\n\n```javascript\n// Module import\nconst Parser = require(\"binary-parser\").Parser;\n\n// Alternative way to import the module\n// import { Parser } from \"binary-parser\";\n\n// Build an IP packet header Parser\nconst ipHeader = new Parser()\n  .endianness(\"big\")\n  .bit4(\"version\")\n  .bit4(\"headerLength\")\n  .uint8(\"tos\")\n  .uint16(\"packetLength\")\n  .uint16(\"id\")\n  .bit3(\"offset\")\n  .bit13(\"fragOffset\")\n  .uint8(\"ttl\")\n  .uint8(\"protocol\")\n  .uint16(\"checksum\")\n  .array(\"src\", {\n    type: \"uint8\",\n    length: 4\n  })\n  .array(\"dst\", {\n    type: \"uint8\",\n    length: 4\n  });\n\n// Prepare buffer to parse.\nconst buf = Buffer.from(\"450002c5939900002c06ef98adc24f6c850186d1\", \"hex\");\n\n// Parse buffer and show result\nconsole.log(ipHeader.parse(buf));\n```\n\n## Installation\n\nYou can install `binary-parser` via npm:\n\n```bash\nnpm install binary-parser\n```\n\nThe npm package provides entry points for both CommonJS and ES modules.\n\n## API\n\n### new Parser()\nCreate an empty parser object that parses nothing.\n\n### parse(buffer)\nParse a `Buffer`/`Uint8Array` object `buffer` with this parser and return the\nresulting object. When `parse(buffer)` is called for the first time, the\nassociated parser code is compiled on-the-fly and internally cached.\n\n### create(constructorFunction)\nSet the constructor function that should be called to create the object\nreturned from the `parse` method.\n\n### [u]int{8, 16, 32, 64}{le, be}(name[, options])\nParse bytes as an integer and store it in a variable named `name`. `name`\nshould consist only of alphanumeric characters and start with an alphabet.\nNumber of bits can be chosen from 8, 16, 32 and 64. Byte-ordering can be either\n`le` for little endian or `be` for big endian. With no prefix, it parses as a\nsigned number, with `u` prefix as an unsigned number. The runtime type\nreturned by the 8, 16, 32 bit methods is `number` while the type\nreturned by the 64 bit is `bigint`.\n\n**Note:** [u]int64{be,le} methods only work if your runtime is node v12.0.0 or\ngreater. Lower versions will throw a runtime error.\n\n```javascript\nconst parser = new Parser()\n  // Signed 32-bit integer (little endian)\n  .int32le(\"a\")\n  // Unsigned 8-bit integer\n  .uint8(\"b\")\n  // Signed 16-bit integer (big endian)\n  .int16be(\"c\")\n  // signed 64-bit integer (big endian)\n  .int64be(\"d\")\n```\n\n### bit\\[1-32\\](name[, options])\nParse bytes as a bit field and store it in variable `name`. There are 32\nmethods from `bit1` to `bit32` each corresponding to 1-bit-length to\n32-bits-length bit field.\n\n### {float, double}{le, be}(name[, options])\nParse bytes as a floating-point value and stores it to a variable named\n`name`.\n\n```javascript\nconst parser = new Parser()\n  // 32-bit floating value (big endian)\n  .floatbe(\"a\")\n  // 64-bit floating value (little endian)\n  .doublele(\"b\");\n```\n\n### string(name[, options])\nParse bytes as a string. `name` should consist only of alpha numeric\ncharacters and start with an alphabet. `options` is an object which can have\nthe following keys:\n\n- `encoding` - (Optional, defaults to `utf8`) Specify which encoding to use.\n  Supported encodings include `\"hex\"` and all encodings supported by\n  [`TextDecoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/encoding).\n- `length ` - (Optional) Length of the string. Can be a number, string or a\n  function. Use number for statically sized arrays, string to reference\n  another variable and function to do some calculation.\n- `zeroTerminated` - (Optional, defaults to `false`) If true, then this parser\n  reads until it reaches zero.\n- `greedy` - (Optional, defaults to `false`) If true, then this parser reads\n  until it reaches the end of the buffer. Will consume zero-bytes.\n- `stripNull` - (Optional, must be used with `length`) If true, then strip\n  null characters from end of the string.\n\n### buffer(name[, options])\nParse bytes as a buffer. Its type will be the same as the input to\n`parse(buffer)`. `name` should consist only of alpha numeric characters and\nstart with an alphabet. `options` is an object which can have the following\nkeys:\n\n- `clone` - (Optional, defaults to `false`) By default,\n  `buffer(name [,options])` returns a new buffer which references the same\n  memory as the parser input, but offset and cropped by a certain range. If\n  this option is true, input buffer will be cloned and a new buffer\n  referencing a new memory region is returned.\n- `length ` - (either `length` or `readUntil` is required) Length of the\n  buffer. Can be a number, string or a function. Use number for statically\n  sized buffers, string to reference another variable and function to do some\n  calculation.\n- `readUntil` - (either `length` or `readUntil` is required) If `\"eof\"`, then\n  this parser will read till it reaches the end of the `Buffer`/`Uint8Array`\n  object. If it is a function, this parser will read the buffer until the\n  function returns true.\n\n### array(name, options)\nParse bytes as an array. `options` is an object which can have the following\nkeys:\n\n- `type` - (Required) Type of the array element. Can be a string or a user\n  defined `Parser` object. If it's a string, you have to choose from [u]int{8,\n  16, 32}{le, be}.\n- `length` - (either `length`, `lengthInBytes`, or `readUntil` is required)\n  Length of the array. Can be a number, string or a function. Use number for\n  statically sized arrays.\n- `lengthInBytes` - (either `length`, `lengthInBytes`, or `readUntil` is\n  required) Length of the array expressed in bytes. Can be a number, string or\n  a function. Use number for statically sized arrays.\n- `readUntil` - (either `length`, `lengthInBytes`, or `readUntil` is required)\n  If `\"eof\"`, then this parser reads until the end of the `Buffer`/`Uint8Array`\n  object. If function it reads until the function returns true.\n\n```javascript\nconst parser = new Parser()\n  // Statically sized array\n  .array(\"data\", {\n    type: \"int32\",\n    length: 8\n  })\n\n  // Dynamically sized array (references another variable)\n  .uint8(\"dataLength\")\n  .array(\"data2\", {\n    type: \"int32\",\n    length: \"dataLength\"\n  })\n\n  // Dynamically sized array (with some calculation)\n  .array(\"data3\", {\n    type: \"int32\",\n    length: function() {\n      return this.dataLength - 1;\n    } // other fields are available through `this`\n  })\n\n  // Statically sized array\n  .array(\"data4\", {\n    type: \"int32\",\n    lengthInBytes: 16\n  })\n\n  // Dynamically sized array (references another variable)\n  .uint8(\"dataLengthInBytes\")\n  .array(\"data5\", {\n    type: \"int32\",\n    lengthInBytes: \"dataLengthInBytes\"\n  })\n\n  // Dynamically sized array (with some calculation)\n  .array(\"data6\", {\n    type: \"int32\",\n    lengthInBytes: function() {\n      return this.dataLengthInBytes - 4;\n    } // other fields are available through `this`\n  })\n\n  // Dynamically sized array (with stop-check on parsed item)\n  .array(\"data7\", {\n    type: \"int32\",\n    readUntil: function(item, buffer) {\n      return item === 42;\n    } // stop when specific item is parsed. buffer can be used to perform a read-ahead.\n  })\n\n  // Use user defined parser object\n  .array(\"data8\", {\n    type: userDefinedParser,\n    length: \"dataLength\"\n  });\n```\n\n### choice([name,] options)\nChoose one parser from multiple parsers according to a field value and store\nits parsed result to key `name`. If `name` is null or omitted, the result of\nthe chosen parser is directly embedded into the current object. `options` is\nan object which can have the following keys:\n\n- `tag` - (Required) The value used to determine which parser to use from the\n  `choices`. Can be a string pointing to another field or a function.\n- `choices` - (Required) An object which key is an integer and value is the\n  parser which is executed when `tag` equals the key value.\n- `defaultChoice` - (Optional) In case if the tag value doesn't match any of\n  `choices`, this parser is used.\n\n```javascript\nconst parser1 = ...;\nconst parser2 = ...;\nconst parser3 = ...;\n\nconst parser = new Parser().uint8(\"tagValue\").choice(\"data\", {\n  tag: \"tagValue\",\n  choices: {\n    1: parser1, // if tagValue == 1, execute parser1\n    4: parser2, // if tagValue == 4, execute parser2\n    5: parser3 // if tagValue == 5, execute parser3\n  }\n});\n```\n\nCombining `choice` with `array` is an idiom to parse\n[TLV](http://en.wikipedia.org/wiki/Type-length-value)-based binary formats.\n\n### nest([name,] options)\nExecute an inner parser and store its result to key `name`. If `name` is null\nor omitted, the result of the inner parser is directly embedded into the\ncurrent object. `options` is an object which can have the following keys:\n\n- `type` - (Required) A `Parser` object.\n\n### pointer(name [,options])\nJump to `offset`, execute parser for `type` and rewind to previous offset.\nUseful for parsing binary formats such as ELF where the offset of a field is\npointed by another field.\n\n- `type` - (Required) Can be a string `[u]int{8, 16, 32, 64}{le, be}`\n   or a user defined `Parser` object.\n- `offset` - (Required) Indicates absolute offset from the beginning of the\n  input buffer. Can be a number, string or a function.\n\n### saveOffset(name [,options])\nSave the current buffer offset as key `name`. This function is only useful\nwhen called after another function which would advance the internal buffer\noffset.\n\n```javascript\nconst parser = new Parser()\n  // this call advances the buffer offset by\n  // a variable (i.e. unknown to us) number of bytes\n  .string(\"name\", {\n    zeroTerminated: true\n  })\n  // this variable points to an absolute position\n  // in the buffer\n  .uint32(\"seekOffset\")\n  // now, save the \"current\" offset in the stream\n  // as the variable \"currentOffset\"\n  .saveOffset(\"currentOffset\")\n  // finally, use the saved offset to figure out\n  // how many bytes we need to skip\n  .seek(function() {\n    return this.seekOffset - this.currentOffset;\n  })\n  ... // the parser would continue here\n```\n\n### seek(relOffset)\nMove the buffer offset for `relOffset` bytes from the current position. Use a\nnegative `relOffset` value to rewind the offset. This method was previously\nnamed `skip(length)`.\n\n### endianness(endianness)\nDefine what endianness to use in this parser. `endianness` can be either\n`\"little\"` or `\"big\"`. The default endianness of `Parser` is set to big-endian.\n\n```javascript\nconst parser = new Parser()\n  .endianness(\"little\")\n  // You can specify endianness explicitly\n  .uint16be(\"a\")\n  .uint32le(\"a\")\n  // Or you can omit endianness (in this case, little-endian is used)\n  .uint16(\"b\")\n  .int32(\"c\");\n```\n\n### namely(alias)\nSet an alias to this parser, so that it can be referred to by name in methods\nlike `.array`, `.nest` and `.choice`, without the requirement to have an\ninstance of this parser.\n\nEspecially, the parser may reference itself:\n\n```javascript\nconst stop = new Parser();\n\nconst parser = new Parser()\n  .namely(\"self\") // use 'self' to refer to the parser itself\n  .uint8(\"type\")\n  .choice(\"data\", {\n    tag: \"type\",\n    choices: {\n      0: stop,\n      1: \"self\",\n      2: Parser.start()\n        .nest(\"left\", { type: \"self\" })\n        .nest(\"right\", { type: \"self\" }),\n      3: Parser.start()\n        .nest(\"one\", { type: \"self\" })\n        .nest(\"two\", { type: \"self\" })\n        .nest(\"three\", { type: \"self\" })\n    }\n  });\n\n//        2\n//       / \\\n//      3   1\n//    / | \\  \\\n//   1  0  2  0\n//  /     / \\\n// 0     1   0\n//      /\n//     0\n\nconst buffer = Buffer.from([\n  2,\n  /* left -\u003e */ 3,\n    /* one   -\u003e */ 1, /* -\u003e */ 0,\n    /* two   -\u003e */ 0,\n    /* three -\u003e */ 2,\n      /* left  -\u003e */ 1, /* -\u003e */ 0,\n      /* right -\u003e */ 0,\n  /* right -\u003e */ 1, /* -\u003e */ 0\n]);\n\nparser.parse(buffer);\n```\n\nFor most of the cases there is almost no difference to the instance-way of\nreferencing, but this method provides the way to parse recursive trees, where\neach node could reference the node of the same type from the inside.\n\nAlso, when you reference a parser using its instance twice, the generated code\nwill contain two similar parts of the code included, while with the named\napproach, it will include a function with a name, and will just call this\nfunction for every case of usage.\n\n**Note**: This style could lead to circular references and infinite recursion,\nto avoid this, ensure that every possible path has its end. Also, this\nrecursion is not tail-optimized, so could lead to memory leaks when it goes\ntoo deep.\n\nAn example of referencing other parsers:\n\n```javascript\n// the line below registers the name \"self\", so we will be able to use it in\n// `twoCells` as a reference\nconst parser = Parser.start().namely(\"self\");\n\nconst stop = Parser.start().namely(\"stop\");\n\nconst twoCells = Parser.start()\n  .namely(\"twoCells\")\n  .nest(\"left\", { type: \"self\" })\n  .nest(\"right\", { type: \"stop\" });\n\nparser.uint8(\"type\").choice(\"data\", {\n  tag: \"type\",\n  choices: {\n    0: \"stop\",\n    1: \"self\",\n    2: \"twoCells\"\n  }\n});\n\nconst buffer = Buffer.from([2, /* left */ 1, 1, 0, /* right */ 0]);\n\nparser.parse(buffer);\n```\n\n### wrapped([name,] options)\nRead data, then wrap it by transforming it by a function for further parsing.\nIt works similarly to a buffer where it reads a block of data. But instead of\nreturning the buffer it will pass the buffer on to a parser for further processing.\n\nThe result will be stored in the key `name`. If `name` is an empty string or\n`null`, or if it is omitted, the parsed result is directly embedded into the\ncurrent object.\n\n- `wrapper` - (Required) A function taking a buffer and returning a buffer\n  (`(x: Buffer | Uint8Array ) =\u003e Buffer | Uint8Array`) transforming the buffer\n  into a buffer expected by `type`.\n- `type` - (Required) A `Parser` object to parse the buffer returned by `wrapper`.\n- `length ` - (either `length` or `readUntil` is required) Length of the\n  buffer. Can be a number, string or a function. Use a number for statically\n  sized buffers, a string to reference another variable and a function to do some\n  calculation.\n- `readUntil` - (either `length` or `readUntil` is required) If `\"eof\"`, then\n  this parser will read till it reaches the end of the `Buffer`/`Uint8Array`\n  object. If it is a function, this parser will read the buffer until the\n  function returns `true`.\n\n```javascript\nconst zlib = require(\"zlib\");\n// A parser to run on the data returned by the wrapper\nconst textParser = Parser.start()\n  .string(\"text\", {\n    zeroTerminated: true,\n  });\n\nconst mainParser = Parser.start()\n  // Read length of the data to wrap\n  .uint32le(\"length\")\n  // Read wrapped data\n  .wrapped(\"wrappedData\", {\n    // Indicate how much data to read, like buffer()\n    length: \"length\",\n    // Define function to pre-process the data buffer\n    wrapper: function (buffer) {\n      // E.g. decompress data and return it for further parsing\n      return zlib.inflateRawSync(buffer);\n    },\n    // The parser to run on the decompressed data\n    type: textParser,\n  });\n\nmainParser.parse(buffer);\n```\n\n### sizeOf()\nReturns how many bytes this parser consumes. If the size of the parser cannot\nbe statically determined, a `NaN` is returned.\n\n### compile()\nCompile this parser on-the-fly and cache its result. Usually, there is no need\nto call this method directly, since it's called when `parse(buffer)` is\nexecuted for the first time.\n\n### getCode()\nDynamically generates the code for this parser and returns it as a string.\nUseful for debugging the generated code.\n\n### Common options\nThese options can be used in all parsers.\n\n- `formatter` - Function that transforms the parsed value into a more desired\n  form.\n    ```javascript\n    const parser = new Parser().array(\"ipv4\", {\n      type: uint8,\n      length: \"4\",\n      formatter: function(arr) {\n        return arr.join(\".\");\n      }\n    });\n    ```\n\n- `assert` - Do assertion on the parsed result (useful for checking magic\n  numbers and so on). If `assert` is a `string` or `number`, the actual parsed\n  result will be compared with it with `===` (strict equality check), and an\n  exception is thrown if they mismatch. On the other hand, if `assert` is a\n  function, that function is executed with one argument (the parsed result)\n  and if it returns false, an exception is thrown.\n\n    ```javascript\n    // simple maginc number validation\n    const ClassFile = Parser.start()\n      .endianness(\"big\")\n      .uint32(\"magic\", { assert: 0xcafebabe });\n\n    // Doing more complex assertion with a predicate function\n    const parser = new Parser()\n      .int16le(\"a\")\n      .int16le(\"b\")\n      .int16le(\"c\", {\n        assert: function(x) {\n          return this.a + this.b === x;\n        }\n      });\n    ```\n\n### Context variables\nYou can use some special fields while parsing to traverse your structure.\nThese context variables will be removed after the parsing process.\nNote that this feature is turned off by default for performance reasons, and\nyou need to call `.useContextVars()` at the top level `Parser` to enable it.\nOtherwise, the context variables will not be present.\n\n- `$parent` - This field references the parent structure. This variable will be\n  `null` while parsing the root structure.\n\n  ```javascript\n  var parser = new Parser()\n    .useContextVars()\n    .nest(\"header\", {\n      type: new Parser().uint32(\"length\"),\n    })\n    .array(\"data\", {\n      type: \"int32\",\n      length: function() {\n        return this.$parent.header.length;\n      }\n    });\n  ```\n\n- `$root` - This field references the root structure.\n\n  ```javascript\n  const parser = new Parser()\n    .useContextVars()\n    .nest(\"header\", {\n      type: new Parser().uint32(\"length\"),\n    })\n    .nest(\"data\", {\n      type: new Parser()\n        .uint32(\"value\")\n        .array(\"data\", {\n          type: \"int32\",\n          length: function() {\n            return this.$root.header.length;\n          }\n        }),\n    });\n  ```\n\n- `$index` - This field references the actual index in array parsing. This\n  variable will be available only when using the `length` mode for arrays.\n\n  ```javascript\n  const parser = new Parser()\n    .useContextVars()\n    .nest(\"header\", {\n      type: new Parser().uint32(\"length\"),\n    })\n    .nest(\"data\", {\n      type: new Parser()\n        .uint32(\"value\")\n        .array(\"data\", {\n          type: new Parser().nest({\n            type: new Parser().uint8(\"_tmp\"),\n            formatter: function(item) {\n              return this.$index % 2 === 0 ? item._tmp : String.fromCharCode(item._tmp);\n            }\n          }),\n          length: \"$root.header.length\"\n        }),\n    });\n  ```\n\n## Examples\n\nSee `example/` for real-world examples.\n\n## Benchmarks\n\nA benchmark script to compare the parsing performance with binparse, structron\nand destruct.js is available under `benchmark/`.\n\n## Contributing\n\nPlease report issues to the\n[issue tracker](https://github.com/keichi/binary-parser/issues) if you have\nany difficulties using this module, found a bug, or would like to request a\nnew feature. Pull requests are welcome.\n\nTo contribute code, first clone this repo, then install the dependencies:\n\n```bash\ngit clone https://github.com/keichi/binary-parser.git\ncd binary-parser\nnpm install\n```\n\nIf you added a feature or fixed a bug, update the test suite under `test/` and\nthen run it like this:\n\n```bash\nnpm run test\n```\n\nMake sure all the tests pass before submitting a pull request.\n","funding_links":[],"categories":["TypeScript","typescript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeichi%2Fbinary-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeichi%2Fbinary-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeichi%2Fbinary-parser/lists"}