Your comments show that you are ignorant of the patent application process.
Jurisdictions which are signatories to the international patent convention (almost all countries which do have a patent system) require a prior art search to be submitted together with the application. There are requirements how such a prior art search has to be carried out and the search parameters have to be submitted as well. There are also requirements to submit comments on the results which show up and how they relate or don't relate to the invention a patent is applied for, and if claimed irrelevant, then why (based on the claims and the claims alone).
Applications which do not return any similar prior art are always treated with great suspicion and will show up on even the most overworked examiners radar screen which then triggers a request for submission of a broader prior art search which increases your patent attorney fees.
In any event, there is nothing wrong with multiple patents for different ways to code and decode a given algorithm. This is due to the fact that algorithms are by definition excluded from patentability. What can be patented is a certain method how to implement an algorithm, never the algorithm itself. Thus, if somebody else comes up with an even only slightly different method to calculate the same algorithm, then that method is also _in principle_ patentable. What you call individual components in an application is entirely irrelevant to the claims section because the claims must describe the purpose and function of such components in a generic way.
For example a claim typically speaks of "a means to determine whether X is Y" and "a further means to indicate/start/stop/modify" etc etc. One application may call the means to detect X==Y a watchdog, another may call it a monitor, yet another may use a made up word. Yet, it doesn't matter what the application calls it, because the claim must describe it generically and at the generic level claims will match if they claim the same.
It can be sufficiently determined from these claims whether two patent applications for a method to encode and decode a JPEG image are identical or not. If they are not, then there will be two patents that achieve the same end but doing it in sufficiently different ways as to be legally patentable (provided they fulfill the requirements of industrial applicability, novelty, an inventive step and a description in sufficient detail to permit persons skilled in the art to implement the invention).