Skip to content

V5.1.0#11

Merged
pro100andrey merged 6 commits into
mainfrom
v5.1.0
May 29, 2026
Merged

V5.1.0#11
pro100andrey merged 6 commits into
mainfrom
v5.1.0

Conversation

@pro100andrey
Copy link
Copy Markdown
Owner

  • BinaryWriterPool:

    • New Feature: Added BinaryWriterPool.configure() for global pool settings (maxPoolSize, initialBufferSize, maxReusableCapacity).
    • New Feature: Implemented "best-fit" acquisition strategy to minimize memory fragmentation.
    • New Feature: Added BinaryWriterPool.stats for real-time pool performance monitoring.
    • Improvement: Optimized release() and clear() logic with zero-allocation buffer detachment.
    • Bug Fix: Renamed initialBufferSizer to initialBufferSize (API alignment).
  • BinaryWriter:

    • New Feature: Added operator [] and operator []= for symmetric random access to written bytes.
    • New Feature: Added copy parameter to takeBytes() to allow returning data while retaining the internal buffer for pool reuse.
    • Improvement: Refactored writeUint8At as a functional alias for operator []=.
    • Fix: Corrected documentation for bounds checks on random access methods.
  • Documentation:

    • Unified terminology (using "1 KiB" consistently).
    • Updated withWriter examples to recommend takeBytes(copy: true) for pooling scenarios.

  - **New Feature**: Added `BinaryWriterPool.configure()` for global pool settings (`maxPoolSize`, `initialBufferSize`, `maxReusableCapacity`).
  - **New Feature**: Implemented "best-fit" acquisition strategy to minimize memory fragmentation.
  - **New Feature**: Added `BinaryWriterPool.stats` for real-time pool performance monitoring.
  - **Improvement**: Optimized `release()` and `clear()` logic with zero-allocation buffer detachment.
  - **Bug Fix**: Renamed `initialBufferSizer` to `initialBufferSize` (API alignment).

- **BinaryWriter**:
  - **New Feature**: Added `operator []` and `operator []=` for symmetric random access to written bytes.
  - **New Feature**: Added `copy` parameter to `takeBytes()` to allow returning data while retaining the internal buffer for pool reuse.
  - **Improvement**: Refactored `writeUint8At` as a functional alias for `operator []=`.
  - **Fix**: Corrected documentation for bounds checks on random access methods.

- **Documentation**:
  - Unified terminology (using "1 KiB" consistently).
  - Updated `withWriter` examples to recommend `takeBytes(copy: true)` for pooling scenarios.
@pro100andrey pro100andrey merged commit 6a174e3 into main May 29, 2026
4 checks passed
@pro100andrey pro100andrey deleted the v5.1.0 branch May 29, 2026 09:47
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