Yes
Both Apache License 2.0 and zlib License are permissive licenses with minimal obligations. Combining code under them is straightforward; ensure the original copyright notices are preserved alongside any new ones.
| License | Family | Patent grant |
|---|---|---|
| Apache License 2.0 (Apache-2.0) | permissive | Yes |
| zlib License (Zlib) | permissive | No (implicit at most) |
Apache License 2.0: Permissive with an explicit patent grant and contribution terms.
zlib License: Permissive, with a misrepresentation-of-origin clause.
If you found this page because you're trying to figure out whether shipping a particular dependency is safe, the answer above is a starting point — not a substitute for reading the actual licenses or talking to a lawyer when stakes are high.
LicenseHound walks every transitive dependency in your repo, maps each to its SPDX license, and flags pairs like this one in PR comments. The CLI is free; the team dashboard is paid.