11cb0ef41Sopenharmony_ci== Patches applied on top of zlib ==
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ci - 0000-build.patch: changes from the upstream version, mostly related to the
41cb0ef41Sopenharmony_ci   build.
51cb0ef41Sopenharmony_ci - 0001-simd.patch: integrate Intel SIMD optimizations from
61cb0ef41Sopenharmony_ci   https://github.com/jtkukunas/zlib/
71cb0ef41Sopenharmony_ci - 0002-uninitializedcheck.patch: prevent uninitialized use of state->check
81cb0ef41Sopenharmony_ci
91cb0ef41Sopenharmony_ci== Procedure to create a patch file ==
101cb0ef41Sopenharmony_ci
111cb0ef41Sopenharmony_ci  Assuming you are working in a new feature branch:
121cb0ef41Sopenharmony_ci - git format-patch master --stdout > foo.patch # where naming follows a growing
131cb0ef41Sopenharmony_ci                                                # number plus patch description.
141cb0ef41Sopenharmony_ci - git add foo.patch
151cb0ef41Sopenharmony_ci - git commit -a -m "Local patch."
161cb0ef41Sopenharmony_ci - git rebase -i HEAD~2 # Squashing the second commit
171cb0ef41Sopenharmony_ci
181cb0ef41Sopenharmony_ci  As patches created in this way will feature a ChangeLog, there is no longer
191cb0ef41Sopenharmony_cithe need to append this file with a description of what the patch does. This
201cb0ef41Sopenharmony_cishould help to solve frequent conflicts in pending new patches on
211cb0ef41Sopenharmony_ciChromium's zlib.
221cb0ef41Sopenharmony_ci
231cb0ef41Sopenharmony_ci  The plan for the near future is to better insulate the platform specific
241cb0ef41Sopenharmony_cichanges to ease update adoption with new releases of zlib. This insulation
251cb0ef41Sopenharmony_cihappens by making changes inside contrib/ rather than the root directory
261cb0ef41Sopenharmony_ci(where conflicts can happen).
271cb0ef41Sopenharmony_ci
281cb0ef41Sopenharmony_ci  If a change modifies enough things inside the root directory that the
291cb0ef41Sopenharmony_ciintention is not immediately clear, generate a .patch file to go with your
301cb0ef41Sopenharmony_cichange. If the change's modifications in the root directory are small, like:
311cb0ef41Sopenharmony_ci
321cb0ef41Sopenharmony_ci#ifdef FEATURE_FLAG
331cb0ef41Sopenharmony_ciuse_special_feature();
341cb0ef41Sopenharmony_ci#elif
351cb0ef41Sopenharmony_ciuse_default_behavior();
361cb0ef41Sopenharmony_ci#endif
371cb0ef41Sopenharmony_ci
381cb0ef41Sopenharmony_ci  then the intent is clear and a .patch file doesn't need to be generated (since
391cb0ef41Sopenharmony_ciit would not provide much value).
401cb0ef41Sopenharmony_ci
411cb0ef41Sopenharmony_ci  Ideally local changes should have a merge request featured in either:
421cb0ef41Sopenharmony_ci - canonical zlib: https://github.com/madler/zlib/
431cb0ef41Sopenharmony_ci - zlib-ng: https://github.com/Dead2/zlib-ng
44