Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Similar libary #10

Open
emibcn opened this issue Feb 5, 2021 · 0 comments
Open

Similar libary #10

emibcn opened this issue Feb 5, 2021 · 0 comments

Comments

@emibcn
Copy link

emibcn commented Feb 5, 2021

Hi there!!
I've just published a similar library, which allows using JS objects with ArrayBuffer/SharedBuffer backed data. I could not find yours until now (after publishing). My library is @3m1/binary-object (source code), which allows defining the schema like I do when I use C structs/C++ classes to read/write binary data to/from files: in an OOP way (using JS @decorators).

Besides having an acceptable OOP interface, I've focused in performance. The current version is just 2-3 times slower than JS natural classes/objects and consumes 2-3 times more heap memory on instantiation (at least, when executing with Node 14).

I think both projects can benefit from sharing tools and tricks and, who knows, maybe some day create a merging project. But, for sure, I would appreciate any advice and or feedback you could give me about my project. I'm going to take yours and run some profiling to compare them ans spot possible enhancements.

It still have some important TODOs like:

  • Allow padding arrays to be able to use TypedArrays instead of my hacky BinaryArray
  • Take care of endianess
  • Create dynamic arrays definition which may grow/decrease
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant