Skip to content

PHP-binary-tools PR #3 docs#15

Merged
kduma merged 5 commits into
mainfrom
kduma-patch-1
Sep 18, 2025
Merged

PHP-binary-tools PR #3 docs#15
kduma merged 5 commits into
mainfrom
kduma-patch-1

Conversation

@kduma

@kduma kduma commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

Refers kduma-OSS/PHP-binary-tools#3

This pull request updates the documentation for the kduma/binary-tools PHP library, introducing new features for flexible integer handling and terminator-based parsing, and refactoring usage examples and API descriptions to reflect these enhancements. The changes modernize the API, add support for more binary protocols, and clarify the distinction between string and binary data operations.

Core API and Feature Enhancements

  • Replaced fixed big-endian integer support with flexible integer handling using the new IntType enum, which allows configurable byte order and signedness for all integer operations. All relevant examples and method signatures now use IntType instead of hardcoded types. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Added terminator support for both reading and writing operations, enabling parsing and construction of null-terminated and custom-delimited data. Introduced the Terminator enum and updated examples to demonstrate usage. [1] [2] [3] [4] [5] [6] [7]

Documentation and Example Improvements

  • Updated all code samples and explanations to use the new writeInt, readInt, writeStringWith, and readStringWith methods, showing how to handle various integer types and terminator-based parsing. Deprecated older methods and provided migration guidance. [1] [2] [3] [4] [5] [6]
  • Added detailed reference tables for IntType and Terminator, including supported types, byte sizes, endianness, and available terminator values for binary parsing. [1] [2]

API Reference and Migration Notes

  • Documented deprecated methods, their replacements, and provided clear guidance for transitioning to the new API, ensuring backward compatibility while encouraging best practices.

These changes make the library more robust for protocol work and clarify usage for both binary and text data.

Updated binary tools documentation to reflect changes in integer handling and added support for terminators.
Added support for fixed-size field padding in BinaryString methods.
Added API reference documentation for Binary Tools in PHP, including BinaryString, BinaryWriter, and BinaryReader classes with detailed method descriptions and usage examples.
@kduma kduma merged commit 29293b2 into main Sep 18, 2025
@kduma kduma deleted the kduma-patch-1 branch September 18, 2025 19:14
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

Successfully merging this pull request may close these issues.

1 participant