Skip to content

Packet 0.0.6

Latest
Compare
Choose a tag to compare
@bigeasy bigeasy released this 04 Jul 17:49
· 1097 commits to master since this release

Never too early to learn how to punch cards
Never too early to learn how to punch cards. by Marcin Wichary, Code for America Fellow. Tracker

Installing Packet 0.0.6

npm install packet

Create Packet Inspectors with offsetsOf

Now, in addition to paring binary data into JSON and serializing JSON data into binary, Packet will also show you it's work, generating a report on which parts of a binary pattern matched which regions in a binary stream. This is the new offsetsOf function. With it, you can create a binary inspection program.

Coverage with Istanbul and Coveralls

Packet's test coverage is now verified with Istanbul. The detailed LCOV reports can be found on the GitHub Pages side for Packet.

Also, with the help of cnainus/node-coveralls, tests are run during Travis CI builds and published at Coveralls.

Development Diary

Packet now has a development diary where I record my half-backed thoughts.

Issue By Issue

  • Implement Serializer.offsetsOf. #87. #85. #86. #63.
  • Objects primary, positional arguments secondary. #84.
  • Reset namedness of Parser. #83.
  • Serialize and parsed a named length encoded array. #82.
  • Increase test coverage. #77. #69. #68. #67. #66.
  • Test text to float conversion. #66.
  • Remove n syntax from README. @jryans. #64.
  • Remove detection of n synonym for b.
  • Remove asterisk to indicate wildcard condition. #33.
  • Parser.parse returns bytes read. #60.
  • Report coverage to Coveralls. #61.
  • Rename pattern to field. #57.
  • Massive tidy after change in enclosed objects.

Contributors

Thank you to @jryans for keeping the documentation up to date with the implementation in #64.

Next Steps / Packet 0.0.7

First time using GitHub Releases. Is it imprudent to talk about one's grand plans for the next release so soon? Probably. Here it goes.

Packet 0.0.7 will first achieve 100% test coverage. Then both parse and write it will be refactored into a composed strategy pattern using pre-compiled best-foot-forward packet parsers that fall back to a composition general purpose parsing functions.

It will be hard to write a parser or serializer that's faster than the pre-compiled once generated by Packet, and certainly more tedious to maintain.