rqrr icon indicating copy to clipboard operation
rqrr copied to clipboard

Provide feature of extracting Raw Data

Open erion-leka opened this issue 1 year ago • 1 comments

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 and src/lib.rs introduces several changes to enhance functionality and improve code readability. The most important changes include making the data field in RawData 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 method get_raw to extract raw data from a QR code.
  • src/lib.rs: Added a new method get_raw_data to the public API to expose the get_raw functionality.

Code Modifications:

  • src/decode.rs: Modified read_data and read_bit functions to handle an optional remove_mask parameter. [1] [2] [3]
  • src/decode.rs: Made the data field in RawData public to allow external access.

Minor Changes:

  • src/decode.rs: Added missing newlines for better readability. [1] [2] [3] [4]
  • src/lib.rs: Updated the pub use statement to include RawData.

erion-leka avatar Sep 29 '24 19:09 erion-leka

Please rebase and fix the formatting. Then I'll happily merge this.

WanzenBug avatar Sep 30 '24 06:09 WanzenBug

Im sorry if I caused some chaos, but is it now appropriate?

erion-leka avatar Oct 06 '24 22:10 erion-leka

If squashed all commits and added some docs in be6202c0bba4650c74fdfccdadf69c4fe3894c65

WanzenBug avatar Oct 07 '24 05:10 WanzenBug