Conversation
Formats such as `.wav` rely on 24 bits number. DataView doesn't support reading and writing such number. This commits adds support for it. This commits the following decorator to describe property as 24 bits integers: - `@Uint24`: Unsigned 24 bits integer - `@Int24`: Signed 24 bits integer
This package is no longer needed since the webpack dependency has been dropped.
Improve the overall bindump functions: - Support bindump partial lines - Add docs to options - Fixes padding for different bases
The binread metadata have basic informations such as the offset before and after reading the property that make it possible to dump the content of the object.
The 'bindump' functions only use a small subset of the function made available by the BinaryReader and it made no sense to still make it mandatory to pass a BinaryReader object.
Emphasize that it's not contrained to hex representation.
Metadata are created and the offset before and after reading each primitive will be logged to keep track of the position of each properties. Those metadata can be kept to dump the content of the bin.
This change introduce the `--dump` option to the bson example interactive utility. It shows how to use the metadata to dump the content of a binary definition.
This allows to pass BinaryCursor as if they were an ArrayBufferView and improve the compatibility between the function and make the API easier to use.
The reader and controller code had a weird mix of function handling EOF value mixed with code handling EOFError. The initial reason for this was that primitive should always returns a value, which could be an EOF, and that value could be compared. But in the end even the `@Until` decorator would check for an EOFError so it didn't made sense to keep it that way and made the code just more confusing. BREAKING CHANGE: The BinaryReader will no longer returns an EOF symbol when reading outside of the buffer range.
If an EOFError occur in the middle of reading a relation it should be passed up the stack. This patch no longer rely on errors to catch EOF and instead just check the current offset and compare it to the length of the Cursor. Fix: #30
- Export default for the base object definition
- Use `@{Big,Little}Endian` instead of `@Endian` decorator.
A bindump of the current state of the reading is now thrown when an error is catched during the reading phase. The `binread` API is more flexible and allow ArrayBuffer, as well as views or BinaryReader. BREAKING CHANGE: The API of the binread slightly changed. - If you need to pass arguments to the topmost definition. Create an object instance instead. - The context is now passed through an option object instead of an argument.
The `BinaryWriter` didn't bring much and we return an ArrayBuffer instead. BREAKING CHANGE: `binwrite` call arguments changed. No longer needs to pass a `BinaryWriter` to the function
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.