-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/ext type #4
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
Open
pro100andrey
wants to merge
22
commits into
main
Choose a base branch
from
feature/ext_type
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
- Introduced a new `FastBinaryWriterBenchmark` class to evaluate performance of the FastBinaryWriter. - Added extensive test cases for writing and reading various data types, including Uint16, Int16, Uint32, Int32, Uint64, Int64, Float32, and Float64, ensuring little-endian format is consistently used. - Updated existing tests to utilize FastBinaryWriter instead of BinaryWriter for improved performance. - Enhanced string writing tests with longer strings containing emojis and complex characters to stress UTF-8 encoding logic. - Ensured all tests validate the expected byte lengths and reset conditions after taking bytes.
… method descriptions and examples
…yReader and BinaryWriter
…naryReader - Added `writeVarBytes` and `readVarBytes` methods for handling length-prefixed byte arrays. - Introduced `writeVarString` and `readVarString` methods for length-prefixed UTF-8 encoded strings. - Implemented `getUtf8Length` function to calculate the UTF-8 byte length of strings without encoding. - Enhanced performance tests for BinaryReader and BinaryWriter to include benchmarks for new methods. - Updated existing tests to cover new functionality and ensure correctness. - Bumped version to 3.0.0 to reflect breaking changes and new features.
…naryWriter for consistency
…andling and state management
…Bytes method and add corresponding tests
…mprehensive tests for boundary cases
… tests for RangeError, and add benchmark configuration
…r and performance
…rom getStatistics to stats
- Implemented benchmarks for skip operations with small, medium, and large offsets. - Added seek operation benchmarks for forward, backward, and random access. - Created benchmarks for rewind, reset, and getPosition operations. - Included benchmarks for remainingBytes and realistic parsing navigation patterns. - Developed string read benchmarks for ASCII, short, long, Cyrillic, CJK, emoji, and mixed Unicode strings. - Added benchmarks for VarString reading and realistic message structures. - Implemented benchmarks for reading VarInt and VarUint with various sizes and distributions.
- Implement benchmarks for writing fixed-size integers (Uint8, Int8, Uint16, Int16, Uint32, Int32, Uint64, Int64) with both big-endian and little-endian formats. - Create benchmarks for writing floating-point numbers (Float32, Float64) including various scenarios such as small values, large values, and special values. - Introduce benchmarks for string writing, covering ASCII, Cyrillic, CJK, emoji, and mixed Unicode strings, as well as VarString scenarios. - Add benchmarks for VarInt and VarUint writing, including fast paths and mixed sizes. - Implement a pool of BinaryWriter benchmarks to evaluate performance in acquiring, releasing, and reusing writers.
…terations - Updated all benchmark tests to use a default BinaryWriter without specifying an initial buffer size. - Increased the number of iterations for various read benchmarks from 100 to 1000 to enhance performance testing. - Added exercise methods to all benchmarks for consistency and clarity in execution.
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.
This pull request introduces the major 3.0.0 release of the
pro_binaryDart library, focusing on a comprehensive documentation overhaul, significant improvements to the README for clarity and real-world usage, enhanced testing, and CI/test configuration updates. Additionally, it removes the now-unnecessaryBinaryReaderInterfaceabstraction and adds a benchmark baseline for performance tracking.Highlights of the release:
BinaryReaderInterfacefile has been removed, reflecting a simplification of the codebase.The most important changes are:
Documentation and Usability Improvements
README.md): The README is now rewritten with a clear value proposition, concise API examples, real-world usage patterns, best practices, encoding efficiency tables, and updated installation instructions for version 3.0.0.CHANGELOG.md): Details the documentation overhaul, new API usage examples, performance notes, and inline comments for complex algorithms.Testing and Benchmarking
CHANGELOG.md)..github/workflows/test.ymland configuration of test tags indart_test.yamlfor better test management. [1] [2]benchmark_baseline.jsonfile to track performance medians for key operations.Codebase Simplification
lib/src/binary_reader_interface.dart, cleaning up unused or redundant abstractions.Minor Fixes
.littlesyntax for endianness inexample/main.dart. [1] [2]This release significantly improves the developer experience, documentation quality, and reliability of the
pro_binarylibrary.This pull request introduces a major update focused on documentation improvements, enhanced test coverage, and minor API usage clarifications. The most significant changes include a comprehensive rewrite of the documentation, substantial expansion of the test suite, and simplification of usage examples. Additionally, the verboseBinaryReaderInterfaceinterface has been removed, streamlining the codebase.Documentation and Examples:
example/main.dartto use the new, shorter.littlesyntax for specifying endianness, improving code clarity. [1] [2]Testing:
writeVarString(),getUtf8Length(), andreadVarString(), as well as edge cases for UTF-8, VarInt, and error handling.Codebase Simplification:
BinaryReaderInterfaceabstract class and its extensive inline documentation, reducing boilerplate and centralizing documentation in the README and API docs.These changes make the library easier to use, better documented, and more robustly tested.