binary-parser icon indicating copy to clipboard operation
binary-parser copied to clipboard

Packet assembly

Open waywardmonkeys opened this issue 11 years ago • 13 comments

Have you considered adding the generation of an assemble method (or whatever you want to call it) where you pass in an object and the parser converts it to a buffer?

waywardmonkeys avatar Oct 22 '14 12:10 waywardmonkeys

Yes I did think about adding binary serialization feature, however, when I first began implementig this library, just parsing was enough. If there are requests for such feature, I could start working on it.

keichi avatar Oct 27 '14 15:10 keichi

It seems like there are very few modules on npm that is capable of both parsing and generating binary data to/from structured data, so more or less, there should be a demand for that kind of a module.

keichi avatar Oct 27 '14 15:10 keichi

deoxxa/dissolve has a partner module deoxxa/concentrate ... https://github.com/bigeasy/packet can do it.

waywardmonkeys avatar Oct 27 '14 15:10 waywardmonkeys

Ah, this is exactly what I meant! Personally, that DSL-based API isn't very attractive though. What are your opinions?

keichi avatar Oct 27 '14 15:10 keichi

I don't like it much. I suspect most of the right thing can happen with the current syntax of binary-parser. One issue would be for skip, but that's something that can be solved.

waywardmonkeys avatar Oct 27 '14 15:10 waywardmonkeys

+1 would like to see this

rkovacevic avatar Sep 18 '15 17:09 rkovacevic

+1 would like to see this

TronicLabs avatar Oct 18 '15 17:10 TronicLabs

+1 would like to see this.

jphgross avatar Jan 20 '16 07:01 jphgross

+1 from me too :]

tevaum avatar Feb 01 '16 12:02 tevaum

:+1:

abalmos avatar Feb 22 '16 03:02 abalmos

In case anyone is interested: I started working on this at fb55/binary-serializer.

fb55 avatar Mar 13 '16 16:03 fb55

I've gone a different way with this and begun implementing a parallel solution from the ground-up that does both serialization and parsing. https://github.com/ryan-rowland/binary-schema

I'm writing the backlog via GitHub issues if anybody is interested in contributing.

It's already on npm as binary-schema

liberty-rowland avatar Apr 05 '16 01:04 liberty-rowland

PR #73 aims to provide the desired functionality. Care to comment on, or lend support for that PR?

emcee-ai avatar Feb 13 '18 05:02 emcee-ai