microsoft / microsoft/lepton_jpeg_rust
Support for prefix garbage?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 182
- Forks
- 17
- Avg merge
- 19h 46m
- Merged PRs (30d)
- 1
Description
As I can see, LEPTON_HEADER_PREFIX_GARBAGE_MARKER is defined, but is not used (self.write_lepton_jpeg_garbage_if_needed(&mut mrw, false)?; is always with false), and Lepton file encoded with -embedded=XXX will exit the library by return err_exit_code(ExitCode::BadLeptonFile, "unknown data found"); Even if not supporting prefix garbage in encode, we can support decoding such files without difficulties.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing uses of LEPTON_HEADER_PREFIX_GARBAGE_MARKER and write_lepton_jpeg_garbage_if_needed, especially the call that passes false. Check how decoding handles -embedded=XXX and where ExitCode::BadLeptonFile is returned. Done means Lepton files with prefix garbage decode successfully without the "unknown data found" error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100