Skip to content
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

feat: add symbol field to ReadResult and WriteResult #191

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Sec-ant
Copy link
Owner

@Sec-ant Sec-ant commented Jan 2, 2025

Summary by CodeRabbit

  • New Features

    • Added a symbol property to barcode read and write results, providing additional image data about the barcode.
    • Introduced a new BarcodeSymbol interface to define the structure of barcode symbols.
    • Enhanced barcode reading and writing structures to include detailed symbol information.
  • Chores

    • Updated import paths and .gitattributes configuration to refine file handling.

Copy link

changeset-bot bot commented Jan 2, 2025

🦋 Changeset detected

Latest commit: c3b2997

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
zxing-wasm Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

coderabbitai bot commented Jan 2, 2025

Walkthrough

The pull request introduces a new symbol property to the barcode reading and writing functionality in the zxing-wasm package. This enhancement adds a representation of the barcode symbol as a one-channel image to both ReadResult and WriteResult interfaces. The changes span multiple files, including TypeScript interfaces, C++ implementation, and configuration files, to consistently add and expose this new symbol information across the package.

Changes

File Change Summary
.changeset/sharp-shrimps-enjoy.md Added changelog entry for new symbol property
.gitattributes Updated __snapshots__ directory attribute from vendored to generated
main.ts Updated import path to use .js extension for index module
src/bindings/barcodeSymbol.ts New BarcodeSymbol interface introduced
src/bindings/readResult.ts Added symbol: BarcodeSymbol to ZXingReadResult
src/bindings/writeResult.ts Added symbol: BarcodeSymbol to ZXingWriteResult
src/cpp/ZXingWasm.cpp Added new Symbol struct and updated bindings to include symbol information

Sequence Diagram

sequenceDiagram
    participant JS as JavaScript
    participant Wasm as WebAssembly Module
    participant Decoder as Barcode Decoder

    JS->>Wasm: Request barcode read/write
    Wasm->>Decoder: Process barcode
    Decoder-->>Wasm: Return result with symbol data
    Wasm->>JS: Return result including symbol
Loading

Poem

🐰 Barcode bunnies hop with glee,
A symbol's tale, now plain to see!
Width and height, data so bright,
In WebAssembly's magical might,
Decoding secrets, oh so free! 🔍


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

pkg-pr-new bot commented Jan 2, 2025

Open in Stackblitz

npm i https://pkg.pr.new/zxing-wasm@191

commit: c3b2997

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
src/cpp/ZXingWasm.cpp (3)

27-31: LGTM! Consider adding documentation.

The Symbol struct is well-defined with appropriate types for JavaScript interoperability. Consider adding documentation comments to describe the purpose of the struct and its fields, especially explaining the format of the data field.

Add documentation like this:

+/**
+ * Represents a barcode symbol as a one-channel image.
+ * @field data The raw pixel data as Uint8ClampedArray
+ * @field width The width of the symbol in pixels
+ * @field height The height of the symbol in pixels
+ */
 struct Symbol {
   val data;
   int width;
   int height;
 };

228-234: Reduce code duplication in write functions.

The symbol initialization code is duplicated between writeBarcodeFromText and writeBarcodeFromBytes. Consider extracting this into a helper function.

+namespace {
+  Symbol createSymbol(const ZXing::Barcode& barcode) {
+    thread_local const val Uint8ClampedArray = val::global("Uint8ClampedArray");
+    return Symbol{
+      .data = std::move(
+        Uint8ClampedArray.new_(
+          val(typed_memory_view(
+            barcode.symbol().rowStride() * barcode.symbol().height(),
+            barcode.symbol().data()
+          ))
+        )
+      ),
+      .width = barcode.symbol().width(),
+      .height = barcode.symbol().height()
+    };
+  }
+} // namespace

Also applies to: 260-266


106-106: Consolidate thread_local declarations.

The Uint8ClampedArray constructor is declared multiple times using thread_local. Consider moving these declarations to file scope to reduce redundancy.

+namespace {
+  thread_local const val Uint8ClampedArray = val::global("Uint8ClampedArray");
+} // namespace

Also applies to: 219-219, 251-251

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7a4ffb7 and c3b2997.

⛔ Files ignored due to path filters (286)
  • tests/__snapshots__/aztec-1/#128/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#128/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#128/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#128/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#128/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#128/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#128/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#128/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#128/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#217/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#217/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#217/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#217/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#217/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#217/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#217/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#217/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/#217/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/7/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/7/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/7/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/7/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/7/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/7/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/7/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/7/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/7/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Historico/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Historico/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Historico/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Historico/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Historico/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Historico/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Historico/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Historico/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Historico/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/HistoricoLong/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/HistoricoLong/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/HistoricoLong/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/HistoricoLong/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/HistoricoLong/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/HistoricoLong/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/HistoricoLong/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/HistoricoLong/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/HistoricoLong/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Z1-sequence4of7/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Z1-sequence4of7/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Z1-sequence4of7/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Z1-sequence4of7/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Z1-sequence4of7/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Z1-sequence4of7/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Z1-sequence4of7/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Z1-sequence4of7/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/Z1-sequence4of7/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-19x19C/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-19x19C/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-19x19C/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-19x19C/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-19x19C/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-19x19C/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-19x19C/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-19x19C/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-19x19C/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-37x37/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-37x37/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-37x37/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-37x37/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-37x37/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-37x37/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-37x37/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-37x37/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-37x37/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-inverted/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-inverted/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-inverted/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-inverted/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-inverted/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-mirrored/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-mirrored/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-mirrored/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-mirrored/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-mirrored/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-mirrored/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-mirrored/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-mirrored/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/abc-mirrored/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thick/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thick/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thick/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thick/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thick/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thick/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thick/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thick/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thick/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thin/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thin/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thin/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thin/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thin/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thin/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thin/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thin/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/az-thin/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/dlusbs/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/dlusbs/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/dlusbs/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/dlusbs/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/dlusbs/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/dlusbs/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/dlusbs/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/dlusbs/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/dlusbs/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/gs1-figure-4.15.1-2-31x31/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/gs1-figure-4.15.1-2-31x31/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/gs1-figure-4.15.1-2-31x31/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/gs1-figure-4.15.1-2-31x31/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/gs1-figure-4.15.1-2-31x31/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/gs1-figure-4.15.1-2-31x31/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/gs1-figure-4.15.1-2-31x31/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/gs1-figure-4.15.1-2-31x31/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/gs1-figure-4.15.1-2-31x31/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/hello/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/hello/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/hello/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/hello/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/hello/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/hello/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/hello/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/hello/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/hello/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-075x075/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-075x075/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-075x075/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-075x075/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-075x075/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-075x075/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-075x075/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-075x075/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-075x075/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-105x105/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-105x105/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-105x105/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-105x105/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-105x105/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-105x105/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-105x105/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-105x105/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-105x105/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-131x131/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-131x131/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-131x131/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-131x131/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-131x131/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-131x131/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-131x131/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-131x131/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-131x131/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-151x151/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-151x151/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-151x151/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-151x151/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-151x151/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-151x151/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-151x151/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-151x151/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/lorem-151x151/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/mixed-ecis-41x41/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/mixed-ecis-41x41/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/mixed-ecis-41x41/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/mixed-ecis-41x41/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/mixed-ecis-41x41/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/mixed-ecis-41x41/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/mixed-ecis-41x41/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/mixed-ecis-41x41/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/mixed-ecis-41x41/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/padding_bs/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/padding_bs/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/padding_bs/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/padding_bs/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/padding_bs/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/padding_bs/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/padding_bs/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/padding_bs/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/padding_bs/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/partial-quiet-zone/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/partial-quiet-zone/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/partial-quiet-zone/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/partial-quiet-zone/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/partial-quiet-zone/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/partial-quiet-zone/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/partial-quiet-zone/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/partial-quiet-zone/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/partial-quiet-zone/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-compact-15x15/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-compact-15x15/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-compact-15x15/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-compact-15x15/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-compact-15x15/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-compact-15x15/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-compact-15x15/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-compact-15x15/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-compact-15x15/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-full-19x19/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-full-19x19/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-full-19x19/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-full-19x19/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-full-19x19/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-full-19x19/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-full-19x19/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-full-19x19/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/readerinit-full-19x19/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-1/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-1/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-1/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-1/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-1/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-1/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-1/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-1/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-1/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-223/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-223/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-223/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-223/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-223/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-223/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-223/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-223/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-223/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-64/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-64/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-64/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-64/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-64/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-64/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-64/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-64/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-64/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-68/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-68/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-68/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-68/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-68/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-68/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-68/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-68/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/rune-68/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tableShifts/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tableShifts/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tableShifts/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tableShifts/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tableShifts/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tableShifts/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tableShifts/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tableShifts/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tableShifts/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tag/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tag/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tag/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tag/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tag/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tag/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tag/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tag/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/tag/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/texte/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/texte/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/texte/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/texte/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/texte/pure-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/texte/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/texte/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/texte/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-1/texte/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-2/01/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-2/01/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-2/01/fast-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-2/01/fast-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-2/01/slow-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-2/01/slow-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-2/01/slow-270.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-2/01/slow-90.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-2/02/fast-0.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-2/02/fast-180.json is excluded by !tests/__snapshots__/**
  • tests/__snapshots__/aztec-2/02/fast-270.json is excluded by !tests/__snapshots__/**
📒 Files selected for processing (7)
  • .changeset/sharp-shrimps-enjoy.md (1 hunks)
  • .gitattributes (1 hunks)
  • main.ts (1 hunks)
  • src/bindings/barcodeSymbol.ts (1 hunks)
  • src/bindings/readResult.ts (2 hunks)
  • src/bindings/writeResult.ts (2 hunks)
  • src/cpp/ZXingWasm.cpp (10 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • .changeset/sharp-shrimps-enjoy.md
  • main.ts
  • src/bindings/readResult.ts
  • .gitattributes
  • src/bindings/writeResult.ts
  • src/bindings/barcodeSymbol.ts
🔇 Additional comments (2)
src/cpp/ZXingWasm.cpp (2)

279-279: LGTM! Bindings are complete and consistent.

The Emscripten bindings for the new Symbol struct and its integration with ReadResult and WriteResult are properly implemented.

Also applies to: 330-331, 357-358


133-139: Consider memory optimization for large symbols.

The implementation correctly uses std::move for efficient transfer of the symbol data. However, for large barcodes, consider adding a size limit or compression for the symbol data to prevent excessive memory usage.

Let's verify the typical symbol sizes in the codebase:

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