-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Serialize and parse fixed byte arrays as buffers.
Implement serialization and parse of buffers, fixed and terminated. Incremental parsing padding fixed arrays is not redirected to the terminated parser implementation which will add checks for reaching the maxiumu fixed length array. Incremental terminated buffer parsing is implemented, but not serialization and not synchrnous operation. Buffers are either catenated, meaning during incremental parse, multiple buffers are gathered, than catenated into a single buffer, or else they are left as an array of buffers which are themselves slices of the underlying buffer. Closes #506. Closes #513. Closes #517.
- Loading branch information
1 parent
f60ef24
commit 7eed865
Showing
137 changed files
with
3,681 additions
and
543 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
function hex (value) { | ||
switch (typeof value) { | ||
case 'number': | ||
return `0x${value.toString(16)}` | ||
case 'object': | ||
return `[ ${value.map(value => hex(value)).join(', ')} ]` | ||
} | ||
} | ||
|
||
module.exports = hex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.