Provide feature of extracting Raw Data #29
Closed
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.
There is no method of getting the uncorrected and unmasked raw data of a QR- Code, as these steps are done in encapsulated in one method, thus not exposing Raw Data. However, there should be a public getter Method for it.
It would benefit the library for offering it, as one has more freedom to inspect read data.
This pull request to
src/decode.rs
andsrc/lib.rs
introduces several changes to enhance functionality and improve code readability. The most important changes include making thedata
field inRawData
public, adding a new method to extract raw data from a QR code, and modifying existing functions to handle an optional mask removal.Functionality Enhancements:
src/decode.rs
: Added a new methodget_raw
to extract raw data from a QR code.src/lib.rs
: Added a new methodget_raw_data
to the public API to expose theget_raw
functionality.Code Modifications:
src/decode.rs
: Modifiedread_data
andread_bit
functions to handle an optionalremove_mask
parameter. [1] [2] [3]src/decode.rs
: Made thedata
field inRawData
public to allow external access.Minor Changes:
src/decode.rs
: Added missing newlines for better readability. [1] [2] [3] [4]src/lib.rs
: Updated thepub use
statement to includeRawData
.