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

Hex encoding support (#66) #108

Closed
wants to merge 36 commits into from
Closed

Hex encoding support (#66) #108

wants to merge 36 commits into from

Conversation

Saiv46
Copy link
Contributor

@Saiv46 Saiv46 commented Jun 14, 2020

No description provided.

@rom1504
Copy link
Member

rom1504 commented Jan 1, 2021

what is the use case?

Avoid OOM crashes when parsing arrays with abnormally large sizes
@Saiv46
Copy link
Contributor Author

Saiv46 commented Jan 2, 2021

As described in #66

extremeheat and others added 12 commits February 8, 2021 12:59
* support writing BigInts

* add buffer offset parameter to parsePacketBuffer

* standard fix

* lint fix, update doc

* use BigIntExtended, update to node 10

* simplify BigIntExt

* fix BigIntExt valueOf

* simplify bigint further

* valueOf -> instanceof

* remove unnecessary instanceof BigIntExt

* use typeof

* cleanup
* compiler: convert map string values to numeric/bool

* expose CompiledProtodef

* const -> let for some compiler structures

This allows the variables to be updated later on by parameterizable types

* Keep values of mapper type if not matched

If a mapper type isn't mapped, default to the value itself to avoid losing data when reading rather than returning undefined

* document CompiledProtodef

Co-authored-by: Romain Beaumont <[email protected]>
rom1504 and others added 9 commits April 8, 2021 00:25
…zing (#124)

* compiler-utils: Allow json to be converted to Buffer object

Allows JSON stringified buffers to be converted to Buffer when serializing

* add buffer conversion to interpreter
* Add context variables to compiler

* new `addVariable` to ProtodefCompiler, `setVariable` to CompiledProtodef
* / at top of switch field will notate a context variable

* add reserved field

* add variables to interpreter, add example

* add to API docs

* update protodef submodule

* update protodef submodule

* test tests

* Update package.json

Co-authored-by: Romain Beaumont <[email protected]>
* Show BigInt instead of BigIntExtended when using console.log

  hashedSeed: BigIntExtended(2) [ -1252218895, -971237565 ] ->
  hashedSeed: -5378239198134528189n

* lint
@Saiv46
Copy link
Contributor Author

Saiv46 commented Sep 21, 2021

Github Desktop fucked up everything by causing mess with commits, re-opening PR.

@Saiv46 Saiv46 closed this Sep 21, 2021
@Saiv46 Saiv46 deleted the patch-2 branch September 21, 2021 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants