Skip to content

feat: support Uint8Array source input and update docs#69

Open
weponary wants to merge 1 commit intomorungos:developfrom
weponary:feature/support-uint8array-source
Open

feat: support Uint8Array source input and update docs#69
weponary wants to merge 1 commit intomorungos:developfrom
weponary:feature/support-uint8array-source

Conversation

@weponary
Copy link
Copy Markdown

@weponary weponary commented Apr 4, 2026

Summary

This PR adds support for [Uint8Array] as a valid input type for the extractor source.

Previously, extraction accepted only:

  • file path string
  • Buffer

Now it also accepts:

  • Uint8Array

What Changed

  • Updated source type handling in the extractor to detect [Uint8Array].
  • Converts [Uint8Array] to Buffer while preserving byte offset and byte length.
  • Updated JSDoc/type annotation to include [Uint8Array].
  • Added a regression test to verify extraction works when source is provided as [Uint8Array].

Validation

  • Ran test suite successfully.
  • Existing behavior for string path and Buffer inputs remains unchanged.
  • Added test coverage for Uint8Array input path.

@weponary weponary marked this pull request as draft April 4, 2026 15:58
@weponary weponary marked this pull request as ready for review April 4, 2026 15:59
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